代码加载storyboard

时间:2015-01-30 19:19:25   收藏:0   阅读:489

自从使用xcode6后,有一些小细节需要注意一下,在加载storyboard的时候一定不要忘记勾选 entry point。特别是主框架是代码,然后个别控制器需要加载storyboard的时候

- (void)pop {
    //弹出请假的窗口
  UIViewController *rootVc = [UIApplication sharedApplication].keyWindow.rootViewController;
    UIStoryboard *storyboard=[UIStoryboard storyboardWithName:@"qingjia" bundle:nil];
    KltLeaveViewController *commm= [storyboard instantiateInitialViewController];
    [rootVc presentViewController:[[UINavigationController alloc]initWithRootViewController:commm] animated:YES completion:nil];
    NSLog(@"pop---");
}

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!