指定进入第一个界面
UINavigationController
- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
// Override point for customization after application launch.
// 1.初始化窗体
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// 2.导航控制器的根控制器
UIStoryboard * sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
ViewController * vc = [sb instantiateViewControllerWithIdentifier:@"login"];
// 3.窗体的根控制器为导航控制器
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
// 4.设置窗体根控制器
self.window.rootViewController = nav;
// 5.显示窗体
[self.window makeKeyAndVisible];
return true;
}
UINavigationController简单设置
-(void)viewDidLoad {
[super viewDidLoad