Application tried to push a nil view controller on target <UINavigationControlle
2016-09-27 15:21
603 查看
1.原因:
采用self.storyboard时,获得的storyboard对象为空
2.修改方法:
初始化一个storyboard对象,然后使用这个对象获得相应的viewcontroller;
3.代码演示:
采用self.storyboard时,获得的storyboard对象为空
2.修改方法:
初始化一个storyboard对象,然后使用这个对象获得相应的viewcontroller;
3.代码演示:
UIStoryboard *stroyboard = [UIStoryboard storyboardWithName:@"Setting" bundle:nil]; PerfectPersonalInfoViewController *infoVC = [stroyboard instantiateViewControllerWithIdentifier:@"PerfectPersonalInfoVCStoryBoardID"]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:infoVC]; infoVC.info = data; infoVC.detail = wechatinfo; [self presentViewController:nav animated:YES completion:nil];
相关文章推荐
- Application tried to push a nil view controller on target
- Application tried to present a nil modal view controller on target “Current View Controller”解决方案
- Application tried to present modal view controller on itself
- iOS: Warning: Attempt to present <ModalViewController> on <ViewController>while a presentation is in
- Warning: Attempt to present <NextViewController: 0x10966fed0> on
- Attempt to present <UINavigationController: 0x7fdf1b100e00> on <ViewController:0x....>
- Application windows are expected to have a root view controller at the end of application launch问题分析
- Application windows are expected to have a root view controller at the end of appliaction launch.
- 关于模态窗口错误 Application tried to present modally an active controller
- Unbalanced calls to begin/end appearance transitions for <IDOOrderHomeViewController: 0x8da2960>.
- Sending 'ViewController *const __strong' to parameter of incompatible type 'id<***Delegate>'
- application windows are expected to have a root view controller错误
- pass all options of <select> from View to controller
- Applications are expected to have a root view controller at the end of application launch
- Unbalanced calls to begin/end appearance transitions for <IDOOrderHomeViewController: 0x8da2960>.
- Application windows are expected to have a root view controller at the end of application launch
- Applications are expected to have a root view controller at the end of application launch
- 关于Application windows are expected to have a root view controller at the end of application launch
- Applications are expected to have a root view controller at the end of application launch
- ios6.0之后单个屏幕旋转,不用根视图以及Application windows are expected to have a root view controller at the end of