扫码关注官方订阅号
欢迎选择我的课程,让我们一起见证您的进步~~
NSArray windows = [[UIApplication sharedApplication] windows]; for(UIWindow *window in windows) { NSLog(@"window: %@",window.description); if(window.rootViewController == nil){ UIViewController vc = [[UIViewController alloc]initWithNibName:nil bundle:nil]; window.rootViewController = vc; }
我得代码
同求,8.4没问题,9.0就报错exception:Application windows are expected to have a root view controller at the end of application launch
你确定你的 self._tabBarController 不是 nil ?
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
NSArray windows = [[UIApplication sharedApplication] windows];
for(UIWindow *window in windows)
{
NSLog(@"window: %@",window.description);
if(window.rootViewController == nil)
{
UIViewController vc = [[UIViewController alloc]initWithNibName:nil bundle:nil]; window.rootViewController = vc;
}
我得代码
同求,8.4没问题,9.0就报错exception:Application windows are expected to have a root view controller at the end of application launch
你确定你的 self._tabBarController 不是 nil ?