非常简单,代码如下
// Override point for customization after application launch.
UIStoryboard *storyBord = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *VC = [storyBord instantiateInitialViewController];
UINavigationController *nv = [[UINavigationController alloc] initWithRootViewController:VC];
self.window.rootViewController = nv;
return YES;
}
warn:代码实现和用storybord拖线实现不能同时使用,否则会造成冲突