重拾iOS之Xcode13.2.1新建工程

1.删除SceneDelegate.h和SceneDelegate.m文件;

2.删除APPDelegate中下面部分内容;

#pragma mark - UISceneSession lifecycle

3.Main.StroyBoard入口去掉;

4.删除info.plist中Application Scene Manifest键值对;

5.设置RootViewcontroller

APPDelegate.h文件中

@property (nonatomic,strong) UIWindow *window;

APPDelegate.m文件中

- (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];
    ViewController *vc = [[ViewController alloc] init];
    self.window.rootViewController = vc;
    [self.window makeKeyAndVisible];
   
    return YES;
}

 

posted @ 2022-03-09 11:51  YouNeedCourage  阅读(96)  评论(0编辑  收藏  举报