IOS开发学习笔记:Xcode 11后的UIWindow初始化

在SceneDelegate.m中初始化UIWindow


- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {

self.window.frame = [UIScreen mainScreen].bounds;
    self.window.rootViewController = [[firstViewController alloc] init];
    [self.window makeKeyAndVisible];

}

之后把info中的Main storyboard file base name的main删除掉即可

你可能感兴趣的:(IOS开发学习笔记:Xcode 11后的UIWindow初始化)