代码加载storyboard

自从使用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---");
}

 

posted @ 2015-01-30 18:08  Joker·venus  阅读(267)  评论(0编辑  收藏  举报