我正在尝试将 UINavigationController 添加到我的 ViewController。当我启动应用程序时,它只给我一个黑屏并且不启动应用程序。
这是我的 AppDelegate.m :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIViewController *rootView = [[ViewController alloc]
initWithNibName:@"ViewController"
bundle:nil];
self.navController = [[UINavigationController alloc] initWithRootViewController:rootView];
[[self window] setRootViewController:self.navController];
//template code
[self.window makeKeyAndVisible];
[rootView release];
return YES;
}
我正在关注这篇文章:http ://simplecode.me/2011/09/04/an-introduction-to-uinavigationcontroller/
怎么了?谢谢!