首页 > 其他 > 详细

storyboard切换程序进入页面

时间:2015-04-21 09:34:07      阅读:193      评论:0      收藏:0      [点我收藏+]
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)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;
}

storyboard切换程序进入页面

原文:http://blog.csdn.net/xiaopeng12300/article/details/45165985

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!