UINavigationBar

extension UINavigationBar

This allows quickly setting the appearance of a UINavigationBar to match your application. This is useful if you’re presenting an STPAddCardViewController or STPPaymentOptionsViewController inside a UINavigationController.

  • Sets the navigation bar’s appearance to the desired theme. This will affect the bar’s tintColor and barTintColor properties, as well as the color of the single-pixel line at the bottom of the navbar.

    Declaration

    Swift

    @available(*, deprecated, message: "Use the `stp_theme` property instead")
    @objc
    public func stp_setTheme(_ theme: STPTheme)

    Parameters

    theme

    the theme to use to style the navigation bar. - seealso: STPTheme.h @deprecated Use the stp_theme property instead

  • Sets the navigation bar’s appearance to the desired theme. This will affect the bar’s tintColor and barTintColor properties, as well as the color of the single-pixel line at the bottom of the navbar. Stripe view controllers will use their navigation bar’s theme for their UIBarButtonItems instead of their own theme if it is not nil.

    Seealso

    STPTheme.h

    Declaration

    Swift

    @objc
    public var stp_theme: STPTheme? { get set }