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.
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 toFUIFeedbackScreen
storyboard in SAPFiori framework bundle. App programmer needs to provide the properties needed inUIController
‘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;
}
-
Creates a
FUIFeedbackScreen
object from storyboard and intitialize subview compoennts.Declaration
Swift
open class func createInstanceFromStoryboard() -> FUIFeedbackScreen
Return Value
A FUIFeedbackScreen object.
-
A message name label displayed as the first label on the screen
Declaration
Swift
@IBOutlet public private(set) var messageNameLabel: FUILabel!
-
A message detail label displayed below
messageNameLabel
Declaration
Swift
@IBOutlet public private(set) var messageDetailLabel: FUILabel!
-
A message detail label displayed below
messageDetailLabel
Declaration
Swift
@IBOutlet public private(set) var messageEmphasisLabel: FUILabel!
-
A message detail label displayed below
messageEmphasisLabel
Declaration
Swift
@IBOutlet public private(set) var messageFootnoteLabel: FUILabel!
-
The only action button on the screen. Tapping this button can execute the block of code implemented in
didTapActionButton
closure by the application.Declaration
Swift
@IBOutlet public private(set) var messageActionButton: FUIOnboardingButton!
-
Application can optionally implement this closure for
messageActionButton
tap actionDeclaration
Swift
public var didTapActionButton: (() -> Void)?