Creating Navigation Controllers
方法:initWithRootViewController:
Initializes and returns a newly created navigation controller.
- (instancetype)initWithRootViewController:(UIViewController *)rootViewController
参数:UIViewController
方法:initWithNavigationBarClass:toolbarClass
Initializes and returns a newly created navigation controller that uses your custom bar subclasses.
- (instancetype)initWithNavigationBarClass:(Class)navigationBarClass
toolbarClass:(Class)toolbarClass
参数:navigationBarClass、toolbarClass
附言:
Use this initialization method if you want to use custom navigation bar or toolbar subclasses with the navigation controller. If you use this method, you are responsible for adding a root view controller before presenting the navigation controller onscreen.