Skip to content

Feedback Screen

FUIFeedbackScreen

open class FUIFeedbackScreen: UIViewController

FUIFeedbackScreen is an UIViewController used to display a feedback screen for the application. The screen mainly displays feedback messages and a feedback action button.

Feedback Screen

There are 4 FUILabels created for feedback messages. They are messageNameLabel, messageDetailLabel, messageEmphasisLabel, and messageFootnoteLabel. Since the screen is implemented based on the FUIFeebackScreen design spec with an action button and either a combination of messageNameLabel and messageDetailLabel and all 4 labels., it is expected that application sets label text to either messageNameLabel and messageDetailLabel only or all the 4 labels.

The action button, messageActionButton, has Touch Up Inside event hooked up with the didTapActionButton closure. Application can implement didTapActionButton closure to perform desired tasks after the button is tapped.

FUIFeedbackScreen is implemented in FUIFeedbackScreen.storyboard. There are two ways to launch the screen:

  • Use another story board and using a "Present Modally" segue to FUIFeedbackScreen storyboard in SAPFiori framework bundle. App programmer needs to provide the properties needed in UIController's prepare for segue function:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let vc = segue.destination as! FUIFeedbackScreen
    vc.didTapActionButton = {
    self.showAppMainView(vc)
}
vc.navigationItem.title = "Error"
//layout 1 that sets the 2 labels' text and the button
//vc.messageNameLabel.text = "Task does not exist"
//vc.messageDetailLabel.text = "Unable to save changes as the task does not exists."
//vc.messageActionButton.setTitle("Continue", for: .normal)

//layout 2 that sets all 4 labels' text and the button
vc.messageNameLabel.text = "Sign In Failed"
vc.messageDetailLabel.text = "You can try entering your passcode again in"
vc.messageEmphasisLabel.text = "5 minutes"
vc.messageFootnoteLabel.text = "Or reset your passcode by entering your credentials."
vc.messageActionButton.setTitle("Reset Passcode", for: .normal)
}
  • Programmatically loads it:
let vc = FUIFeedbackScreen()
vc.didTapActionButton = {
self.showAppMainView(vc)
}
vc.navigationItem.title = "Error"
//layout 1 that sets the 2 labels' text and the button
//vc.messageNameLabel.text = "Task does not exist"
//vc.messageDetailLabel.text = "Unable to save changes as the task does not exists."
//vc.messageActionButton.setTitle("Continue", for: .normal)

//layout 2 that sets all 4 labels' text and the button
vc.messageNameLabel.text = "Sign In Failed"
vc.messageDetailLabel.text = "You can try entering your passcode again in"
vc.messageEmphasisLabel.text = "5 minutes"
vc.messageFootnoteLabel.text = "Or reset your passcode by entering your credentials."
vc.messageActionButton.setTitle("Reset Passcode", for: .normal)

Theming

Example nss definitions

fdlFUIFeedbackScreen_messageNameLabel {
    font-style: body;
    font-color: @primary1;
}

fdlFUIFeedbackScreen_messageDetailLabel {
    font-style: subheadline;
    font-color: @primary1;
}

fdlFUIFeedbackScreen_messageEmphasisLabel {
    font-size: 17;
    font-name: boldSystem;
    font-color: @primary1;
}

fdlFUIFeedbackScreen_messageFootnoteLabel {
    font-style: subheadline;
    font-color: @primary1;
}

fdlFUIFeedbackScreen_messageActionButton {
    font-style: callout;
    font-color: @primary6;
    corner-radius: 8;
    background-color-normal: @tintColorDark;
    background-color-highlighted: @backgroundGradientTop;
}

Last update: December 8, 2020