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

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

解决办法如下:

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

 

相关文章:

  • 2021-12-11
  • 2021-11-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-07-18
  • 2021-10-04
猜你喜欢
  • 2021-04-08
  • 2022-12-23
  • 2021-11-21
  • 2022-01-27
  • 2021-10-20
  • 2022-01-11
相关资源
相似解决方案