Application windows are expected to have a root view controller at the end of application launch 的解决
来源:互联网 发布:java实现解压缩zip 编辑:程序博客网 时间:2024/05/02 04:55
原因:出现的原因一般是运行时未给 self.window的 rootViewController的对象分配内存造成的,如下面类似例子
NSArray *item = [NSArray arrayWithObjects:nc1, nil]; _tabBar.tabBar.backgroundImage = [UIImage imageNamed:@"tabbarbg_app.png"]; [_tabBar setDelegate:self]; [_tabBar setViewControllers:item]; _tabBar.selectedIndex = 0; [self.window setRootViewController:_tabBar]; [self.window setBackgroundColor:[UIColor whiteColor]];
解决方法: 为_tabBar添加内存分配即可
NSArray *item = [NSArray arrayWithObjects:nc1, nil];_tabBar = [[UITabBarController alloc] init]; _tabBar.tabBar.backgroundImage = [UIImage imageNamed:@"tabbarbg_app.png"]; [_tabBar setDelegate:self]; [_tabBar setViewControllers:item]; _tabBar.selectedIndex = 0; [self.window setRootViewController:_tabBar]; [self.window setBackgroundColor:[UIColor whiteColor]];
- 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 application launch
- 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 application launch'
- 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 application launch'
- “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 application launch'
- 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 application launch'
- 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 application launch' [
- Application windows are expected to have a root view controller at the end of appliaction launch.
- Application windows are expected to have a root view controller at the end of appliaction launch.
- 关于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 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
- hdu 3927 (构造反幻方)
- Android异步消息处理
- 不需Developper认证的真机调试
- maven实现项目远程部署到tomcat(热部署)
- php学习 留言版 mguestbook 0.03
- Application windows are expected to have a root view controller at the end of application launch 的解决
- 黄金群号
- android 解析json数据格式
- JSP分页
- ASP中set与dim的区别
- 关于border-collaps
- QT让一个图片随窗体缩放
- 设置透明背景
- acm oj 错误类型