首页 > 代码库 > 代码加载storyboard

代码加载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---");}

 

代码加载storyboard