Contents

init(navigationBarClass:toolbarClass:)

Initializes and returns a newly created navigation controller that uses your custom bar subclasses.

Declaration

init(navigationBarClass: AnyClass?, toolbarClass: AnyClass?)

Parameters

  • navigationBarClass:

    Specify the custom Uinavigationbar subclass you want to use, or specify nil to use the standard Uinavigationbar class.

  • toolbarClass:

    Specify the custom Uitoolbar subclass you want to use, or specify nil to use the standard Uitoolbar class.

Return Value

The initialized navigation controller object or nil if there was a problem initializing the object.

Discussion

To customize the overall appearance of a navigation bar, use UIAppearance APIs instead of this method. If you use this initialization method to create a navigation bar that uses custom bar subclasses, you are responsible for pushing and setting view controllers before presenting the navigation controller onscreen.

See Also

Creating a navigation controller