FUIPrivacyNoticeViewController

open class FUIPrivacyNoticeViewController<AuthorizationStatus> : FUIBaseDrawingViewController<FUIPrivacyNoticeView>, CLLocationManagerDelegate

This UIViewController is used to display a permissions screen to the application for onboarding. The controller mainly shows the user the reason for requesting permission.

Example:

let controller = FUIPrivacyNoticeViewController()
controller.titleText.text = ""
controller.subtitle.text = ""
controller.detailImageView.image = UIImage()
// didSelectHandler
controller.primaryAction?.didSelectHandler = { button in ... }

The FUIPrivacyNoticeItem is a struct type that provides five default types:

  • location: Location permissions
  • notification: Notifications permissions
  • photo: Photos permissions
  • calendar: Calendar permissions
  • camera: Camera permissions

Usage:

let controller = FUIPrivacyNoticeViewController.makeViewController(for: .location) { [weak self] (status: CLAuthorizationStatus) in
guard let self = self else { return }
    ...
}

Theming: Supported style classes

fdlFUIPrivacyNoticeView
fdlFUIPrivacyNoticeView_imageView
fdlFUIPrivacyNoticeView_titleView
fdlFUIPrivacyNoticeView_subtitleView
fdlFUIPrivacyNoticeView_primaryAction
  • Title text to display. (It is not set to UIViewController.title.)

    Declaration

    Swift

    public var titleText: FUIMultiLineText { get }
  • Developer-formatted NSAttributedString to display as the subtitle. This overrides title value and the default styling.

    Declaration

    Swift

    public var titleAttributedText: NSAttributedString! { get set }
  • NUIStyleClassPath for title property

    Declaration

    Swift

    public var titleStyleClassPath: [FioriStyle] { get set }
  • Subtitle text to display

    Declaration

    Swift

    public var subtitle: FUIMultiLineText { get }
  • Developer-formatted NSAttributedString to display as the subtitle. This overrides the subtitle value, and the default styling.

    Declaration

    Swift

    public var subtitleAttributedText: NSAttributedString! { get set }
  • NUIStyleClassPath for subtitle property

    Declaration

    Swift

    public var subtitleStyleClassPath: [FioriStyle] { get set }
  • Undocumented

    Declaration

    Swift

    public var detailImageView: FUIImageView { get }
  • Undocumented

    Declaration

    Swift

    public var primaryAction: FUIButton { get }
  • Undocumented

    Declaration

    Swift

    public typealias FUIAuthorizationStatusChangeHandler = (AuthorizationStatus) -> Void
  • Authorization status callback

    Declaration

    Swift

    public var authorizationStatusChangeHandler: FUIAuthorizationStatusChangeHandler?
  • Undocumented

    Declaration

    Swift

    open override func viewDidLoad()
  • Undocumented

    Declaration

    Swift

    public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus)
  • A class method.

    The FUIPrivacyNoticeItem is a struct type that provides five default types:

    • location: Location permissions
    • notification: Notifications permissions
    • photo: Photos permissions
    • calendar: Calendar permissions
    • camera: Camera permissions

    Parameters:

    • type: a struct type

    Usage:

    let controller = FUIPrivacyNoticeViewController<CLAuthorizationStatus>.makeViewController(for: .Location)
    controller.authorizationStatusChangeHandler = { [weak self] status in
    guard let self = self else { return }
        ...
    }
    

    Declaration

    Swift

    public static func makeViewController(for type: FUIPrivacyNoticeItem) -> FUIPrivacyNoticeViewController