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;
 }
  • Instantiates a regular feedback screen controller.

    The type of this regular feedback screen is FUIFeedbackScreen.

    Declaration

    Swift

    public static var regular: FUIFeedbackScreen { get }
  • Instantiates a sync screen controller.

    Declaration

    Swift

    public static var sync: SyncController { get }
  • Instantiates a connection error screen controller.

    Declaration

    Swift

    public static var connectionError: ConnectionErrorController { get }
  • Instantiates an user transaction error screen controller.

    Declaration

    Swift

    public static var userTransactionError: UserTransactionErrorController { get }
  • Creates a FUIFeedbackScreen object from storyboard and intitialize subview compoennts.

    Declaration

    Swift

    open class func createInstanceFromStoryboard() -> FUIFeedbackScreen

    Return Value

    A FUIFeedbackScreen object.

  • Application can optionally implement this closure for messageActionButton tap action

    Declaration

    Swift

    public var didTapActionButton: (() -> Void)?
  • Declaration

    Swift

    public class BaseController : UIViewController
  • This view controller is to be display when connection error occurred.

    This view contains an error banner, an error image view, a title label, a message label, and an action button.

    • The error banner has a default localized title “Sync Failed”. Developer can use errorBannerView property to customize the banner title.
    • The error image view has a default “no connection” image. Developer can use errorImageView property to customize the image.
    • The title label has a default localized title “No Internet Connection”. Developer can use titleLabel.text property to change the default title.
    • The message label has a default localized message “Please connect to a WiFi network or mobile data network.”. Developer can use messageLabel.text to change the default message.
    • The action button has a default localized title “Try Again”. Developer can use actionButton property to customize the button.

    Also, there is a “Cancel” button on the navigation bar. Developer should set the onCancelHandler property to process user cancel action.

    Theming

    Supported fixed font UILabel class paths:

    fdlFUIFeedbackScreen_ConnectionErrorController_titleLabel
    fdlFUIFeedbackScreen_ConnectionErrorController_messageLabel
    

    Supported fixed font UILabel properties:

    font-size: (Size)
    font-name: (Font Name)
    font-color: (Color)
    

    Supported UIImageView class paths:

    fdlFUIFeedbackScreen_ConnectionErrorController_errorImageView
    

    Supported UIImageView properties:

    image-name: (name of the image file)
    tint-color: (Color)
    

    Support FUIButton class paths:

    fdlFUIFeedbackScreen_ConnectionErrorController_actionButton
    

    Supported FUIButton properties:

    font-style: (Font Style Name)
    font-color: (Color)
    corner-radius: (Radius)
    background-color-normal: (Color)
    background-color-highlighted: (Color)
    

    Supported UIBarButtonItem class paths:

    fdlFUIFeedbackScreen_ConnectionErrorController_closeButton
    

    Supported UIBarButtonItem properties:

    image: (Image Name)
    background-tint-color: (Color)
    
    See more

    Declaration

    Swift

    public class ConnectionErrorController : ErrorController
  • This is the base class for FUIMultiUserTransactionErrorController and FUIMultiUserConnectionErrorController.

    Developeres should not use this class directly.

    See more

    Declaration

    Swift

    public class ErrorController : BaseController
  • This view controller is to display the progress of the sync.

    This view contains a progress bar, a title label, and a message label.

    • The progress bar shows the current sync progress. Developer should use progressBar.progressBar.progress to update the progress.
    • The title label has a default localized title “Sync In Progress”. Developer can use titleLabel.text property to change the default title.
    • The message label has a default localized message “Please wait for the sync to complete to proceed to the application. It may take a few of seconds.”. Developer can use messageLabel.text to change the default message.

    Also, there is a “Cancel” button on the navigation bar. Developer should set the onCancelHandler property to process user cancel action.

    Theming

    Supported fixed font UILabel class paths:

    fdlFUIFeedbackScreen_SyncController_titleLabel
    fdlFUIFeedbackScreen_SyncController_messageLabel
    

    Supported fixed font UILabel properties:

    font-size: (Size)
    font-name: (Font Name)
    font-color: (Color)
    

    Supported progress bar class paths:

    fdlFUIFeedbackScreen_SyncController_progressBar
    

    Supported progress bar properties:

    progress-tint-color: (Color)
    track-tint-color: (Color)
    

    Supported UIBarButtonItem class paths:

    fdlFUIFeedbackScreen_SyncController_cancelButton
    

    Supported UIBarButtonItem properties:

    image: (Image Name)
    background-tint-color: (Color)
    
    See more

    Declaration

    Swift

    public class SyncController : BaseController
  • This view controller is to be display when user transaction error occurred.

    This view contains an error banner, a title label, a message label, an user image view, user name label, user info label, detail message label, and an action button.

    • The error banner has a default localized title “Sync Failed”. Developer can use errorBannerTitle property to customize the error banner title.
    • The title label has a default localized title “Transaction Issue”. Developer can use titleLabel.text property to change the default title.
    • The message label has a default localized message “Before you can access your account on this device, hand over the device to:”. Developer can use messageLabel.text to change the default message.
    • The user image view is to display the user image. Or, the user name initials when user image is not available.
    • The user name label is to display the user name.
    • The user info label is to display the user info.
    • The detail message label has a default localized detail message “They will need to sign in with their account and resolve their transaction issue.”. Developer can use detailMessageLabel property to customize the label.
    • The action button has a default localized title “Return to Sign In Screen”. Developer can use actionButton property to customize the button.

    Also, there is a “Cancel” button on the navigation bar. Developer should set the onCancelHandler property to process user cancel action.

    Theming

    Supported fixed font UILabel class paths:

    fdlFUIFeedbackScreen_UserTransactionErrorController_titleLabel
    fdlFUIFeedbackScreen_UserTransactionErrorController_messageLabel
    fdlFUIFeedbackScreen_UserTransactionErrorController_detailMessageLabel
    fdlFUIFeedbackScreen_UserTransactionErrorController_userNameLabel
    fdlFUIFeedbackScreen_UserTransactionErrorController_userInfoLabel
    

    Supported fixed font UILabel properties:

    font-size: (Size)
    font-name: (Font Name)
    font-color: (Color)
    

    Supported ImagePlaceholder class paths:

    fdlFUIFeedbackScreen_UserTransactionErrorController_userImagePlaceholder
    

    Supported ImagePlaceholder properties:

    font-size: (Size)
    font-name: (Font Name)
    font-color: (Color)
    

    Supported ImagePlaceholderView class paths:

    fdlFUIFeedbackScreen_UserTransactionErrorController_userImagePlaceholderView
    

    Supported ImagePlaceholderView properties:

    background-color: (Color)
    

    Support FUIButton class paths:

    fdlFUIFeedbackScreen_UserTransactionErrorController_actionButton
    

    Supported FUIButton properties:

    font-style: (Font Style Name)
    font-color: (Color)
    corner-radius: (Radius)
    background-color-normal: (Color)
    background-color-highlighted: (Color)
    

    Supported UIBarButtonItem class paths:

    fdlFUIFeedbackScreen_UserTransactionErrorController_closeButton
    

    Supported UIBarButtonItem properties:

    image: (Image Name)
    background-tint-color: (Color)
    
    See more

    Declaration

    Swift

    public class UserTransactionErrorController : ErrorController