Skip to content

MultiPage User Consent Form

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)

Last update: December 8, 2020