I created a UInavigation controller in my xib file. The UINavigation controller is the top level control. I don't need a parent view. Later on I will manually add the UINavigation controller to the window.
What is the best way to instant开发者_StackOverflow中文版iate the UINavigationController? I can't seem to figure out how to do this.
If you do not need to do anything special in the .xib file it is way easier to do this programmatically by adding the following code to your app delegate:
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:myView]; //myView is a view you previously created
[self.window addSubview:nav.view];
精彩评论