Instance Method

initWithNavigationBarClass:toolbarClass:

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

Declaration

- (instancetype)initWithNavigationBarClass:(Class)navigationBarClass toolbarClass:(Class)toolbarClass;

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 Navigation Controllers

- initWithRootViewController:

Initializes and returns a newly created navigation controller.