FUIMultiPageUserConsentForm

open class FUIMultiPageUserConsentForm : FUIUserConsentForm

This class specifies a user consent form with multiple pages of content.


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

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

let userconsentpages = [page1,page2]
let multipageform = FUIMultiPageUserConsentForm(pages: userconsentpages)

  • The pages in the form. Unlike the single page form, where the page is created by the sdk when the properties are supplied to the form, for a multi-page form, each page must be explicitly created and added to this array. The pages will be displayed in the order in which they are added to the array.

    Declaration

    Swift

    public var pages: [FUIUserConsentPage]
  • 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 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