If you're using a storyboard then the UINavigationController
should be set as the initial view controller and it will be loaded and displayed automatically. Now, when something happens in ViewControllerA
it can push ViewControllerB
by using:
ViewControllerB *b = ...;
[self.navigationController pushViewController:b animated:YES];
For enhanced tampering, the app delegate has a window
property. From here you can get the rootViewController
. Cast that to the UINavigationController
and you can modify / push. Set it to something else and you can replace the UINavigationController
all together.