美文网首页
Xcode12 删除Scene

Xcode12 删除Scene

作者: 赵哥窟 | 来源:发表于2021-08-30 09:27 被阅读0次
    1、Deployment Info Main Interface 清空
    截屏2021-08-30 09.26.16.png
    2、AppDelegate 删除如下代码
    #pragma mark - UISceneSession lifecycle
    
    
    - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
        return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
    }
    
    
    - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
        // Called when the user discards a scene session.
        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
    }
    
    
    3、删除SceneDelegate.h 和SceneDelegate.m文件
    4、删除Info.plist中的Application Scene Manifest
    截屏2021-08-30 09.27.21.png
    5、修改applicationdidFinishLaunchingWithOptions
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.
        self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        self.window.backgroundColor = [UIColor whiteColor];
        
        HomeViewController *rootViewController = [[HomeViewController alloc]init];
        UINavigationController *rootNavi = [[UINavigationController alloc]initWithRootViewController:rootViewController];
        self.window.rootViewController = rootNavi;
        
        [self.window makeKeyAndVisible];
        return YES;
    }
    

    相关文章

      网友评论

          本文标题:Xcode12 删除Scene

          本文链接:https://www.haomeiwen.com/subject/pypniltx.html