Application windows are expected to have a root view controller at the end of application launch

今天把Xcode升级了,模拟器 用的12.1的系统,运行时发现项目总是崩溃,采用9.3系统的测试机发现错误日志如下:

Application windows are expected to have a root view controller at the end of application launch

解决办法如下:

self.window = [[UIWindow alloc]initWithFrame:SCREEN_RECT];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UIViewController alloc]init];
[self.window makeKeyAndVisible];

 

posted @ 2018-10-31 14:38  渣渣你好  阅读(4341)  评论(0编辑  收藏  举报