Xcode 7 奔溃
johnlui opened this issue · comments
吕文翰 commented
模拟器和真机都奔溃,说没有设置 rootViewController:
Application windows are expected to have a root view controller at the end of application launch
吕文翰 commented
是我不会设置么== 我一直用 Swift,从 Main.Storyboard 启动,没从 main.m 启动过。
litt1e-p commented
yeah, it wil be crashed in Xcode7 or Xcode7.2 beta. I modified the AppDelegate.m with below codes and it works well:
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- self.window.rootViewController = [[ViewController alloc] init];
- [self.window makeKeyAndVisible];
- //[SMTopWindow work];