I want to do this simple thing: create a uinavigationcontroller but that doesnt show up on launch. Let’s say I want to have a welcome screen with a “Go” button that leads to the uinavigationcontroller. In all the examples that I have seen it looks like the navigationcontroller appears right away. How should I go about doing that?
Thanks!
The mecanic of displaying the navigation controller’s view takes place in the
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;method, in the app delegate. There the NC is added as the rootViewController of the window.If you want to display another one, just set your custom view controller right in place of the NC and then switch the two view controllers (replace the first custom view controller with the NC) in the action method called when the button is pressed.
Assuming
myCustomControllerdefines aUIButtonproperty calledtouchButton:Now write in your app delegate an action method :