FUISinglePageUserConsentForm

open class FUISinglePageUserConsentForm : FUIUserConsentForm, FUIUserConsentPageComponent

This class specifies a user consent form with a single page of content. For a single page form, it is not required to create the FUIUserConsentPage() and then add it to the form, since it is created automatically as part of the init.

let singlepageform = FUISinglePageUserConsentForm()
singlepageform.title.text = "Data Privacy"
singlepageform.body.text = "Detailed text about how data privacy pertains to this app and why it is important for the user to enable this functionality"
singlepageform.actionTitle.text = "Learn more about Data Privacy"
singlepageform.actionHandler = { controller in
let alert = UIAlertController(title: "Want Data Privacy?", message: "Be wise about your data", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
controller.present(alert, animated: true, completion: nil)
}

  • Declaration

    Swift

    public var titleStyleClassPath: [FioriStyle]
  • Declaration

    Swift

    public var bodyStyleClassPath: [FioriStyle]
  • Declaration

    Swift

    public var actionTitleStyleClassPath: [FioriStyle]
  • Declaration

    Swift

    public var attributesProvider: FUIAttributesProvider?
  • title - displays the title of the user consent page.

    Declaration

    Swift

    public var title: FUIText
  • titleAttributedText - displays the attributed text provided as the user consent page title. This property takes precedence if the title property is also set.

    Declaration

    Swift

    public var titleAttributedText: NSAttributedString!
  • body - displays the content of the user consent page.

    Declaration

    Swift

    public var body: FUIText
  • bodyAttributedText - displays the attributed text provided as the user consent page content. This property takes precedence if the body property is also set.

    Declaration

    Swift

    public var bodyAttributedText: NSAttributedString!
  • actionTitle - displays the title of button with link to more information on the details of the content.

    Declaration

    Swift

    public let actionTitle: FUIText
  • actionTitleAttributedText - displays the attributed text provided as the actionTitle. This property takes precedence if the actionTitle property is also set.

    Declaration

    Swift

    public var actionTitleAttributedText: NSAttributedString!
  • actionHandler - invoked with the actionTitle button is tapped.

    Declaration

    Swift

    public var actionHandler: ((FUIUserConsentPageViewController) -> Void)?
  • Boolean denoting whether the user consent form is a mandatory form or not. It is true by default.

    Declaration

    Swift

    public var isRequired: Bool
  • Boolean denoting whether the form was accepted or not by the user. This value can only be read and not set. It can be read by examining the values in the FUIUserConsentViewControllerDelegate protocol methods which are invoked upon the completion of user response to all of the user consent forms presented. This value is false by default. When the forms are presented to the user, if the user agrees to the form, this value is set to true. After a set of forms have been presented to the user, by examining this value for each form in the delegate methods, the user can get information on which forms were accepted or not.

    Declaration

    Swift

    public internal(set) var isUserAccepted: Bool
  • Returns the pages in a form - in an FUISinglePageUserConsentForm, there is always only one page. It is a get only property which is instantiated with the properties provided to the form.

    Declaration

    Swift

    public var pages: [FUIUserConsentPage] { get }