init(rootViewController:)
Initializes and returns a newly created navigation controller.
Declaration
init(rootViewController: UIViewController)Parameters
- rootViewController:
The view controller that resides at the bottom of the navigation stack. This object cannot be an instance of the Uitabbarcontroller class.
Return Value
The initialized navigation controller object or nil if there was a problem initializing the object.
Discussion
This is a convenience method for initializing the receiver and pushing a root view controller onto the navigation stack. Every navigation stack must have at least one view controller to act as the root.