storyboard切換程序進入頁面
編輯:關於IOS
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptionsNSDictionary *)launchOptions {
- if([userDefaults objectForKey:@"autoLogIn"] != nil && [userDefaults objectForKey:@"rand_code"] != nil) {
- UIStoryboard *board = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
- //獲取故事板中某個View
- UIViewController *next = [board instantiateViewControllerWithIdentifier:@"mainTabBar"];
- [self.window setRootViewController:next];
- [self.window makeKeyAndVisible];
- }else{
- UIStoryboard *board = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
- //獲取故事板中某個View
- UIViewController *next = [board instantiateViewControllerWithIdentifier:@"mainTabBar"];
- [self.window setRootViewController:next];
- [self.window makeKeyAndVisible];
- }
- return YES;
- }
- 上一頁:針對Mac OS系統10.10.3開機速度過慢的解決辦法
- 下一頁:IOS調試—斷點調試以及動態輸出
Copyright ©
Ios教程網 All Rights Reserved