UI

public struct UI

Sub-stuct holding configuration relevant to UI presentation.

  • Title to propagate to views handled by OAuth2, such as OAuth2WebViewController.

    Declaration

    Swift

    public var title: String?
  • By assigning your own UIBarButtonItem (!) you can override the back button that is shown in the iOS embedded web view (does NOT apply to SFSafariViewController).

    Declaration

    Swift

    public var backButton: AnyObject?
  • If true it makes the login cancellable, otherwise the cancel button is not shown in the embedded web view.

    Declaration

    Swift

    public var showCancelButton: Bool
  • Starting with iOS 9, SFSafariViewController will be used for embedded authorization instead of our custom class. You can turn this off here.

    Declaration

    Swift

    public var useSafariView: Bool
  • By assigning your own style you can configure how the embedded authorization is presented.

  • Assign a UIColor here, to be applied to the Safari view controller (in iOS 10.10+) or the navigation’s bar tint color if using the legacy web view controller.

  • You can assign a UIColor here, which will be applied to Safari’s (in iOS 10.10+) or the legacy web view controller’s item tint colors (also see: barTintColor).