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: FUIMultiLineText
  • 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!
  • The UIDataDetectorTypes for the body text.

    The default is .all.

    Declaration

    Swift

    public var bodyDataDetectorTypes: UIDataDetectorTypes
  • 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 { get }
  • Returns the individual page instances in a form.

    Note

    in a FUISinglePageUserConsentForm, the count should always be equal to “1”.

    Declaration

    Swift

    public var pages: [FUIUserConsentPage] { get }
  • Set bodyAttributedText and enable the dynamic type when using customized font.

    Declaration

    Swift

    public func setBodyAttributedText(_ attrString: NSAttributedString, replaceWithScaledFont: Bool = false)

    Parameters

    attrString

    The value of NSAttributedString.

    replaceWithScaledFont

    The Bool value to enable the dynamic type for customized font. It is false by default.