谁能告诉我如何从ÀppDelegate? I can start a
开始UINavigationContoller
rootViewContoller but cannot start a specific
UIViewController like I was trying in commented code. The commented code starts the **ChooseTableViewController** but does not display
UINavigationBar`。 什么是更好的方法? 这里是我的代码从appDelegate启动导航控制器
- (void)setRootViewController:(NSString *)storyBoardName {
//set the Root ViewController
UIStoryboard *story = [UIStoryboard storyboardWithName:storyBoardName
bundle:nil];
UINavigationController *newViewController =
[story instantiateInitialViewController];
self.window.rootViewController = newViewController;
/*
ChooseTableViewController *chooseTableViewController =
[story instantiateViewControllerWithIdentifier:@"ChooseTableViewController"];
self.window.rootViewController = chooseTableViewController;
*/
}
把'ChooseTableViewController'作为'UINavigationController'的RootViewController的会为你工作。 –