美文网首页
Xcode新建项目如何跟以前一样从代码启动

Xcode新建项目如何跟以前一样从代码启动

作者: FT__ | 来源:发表于2022-11-29 14:52 被阅读0次

在 iOS 13或者更高版本系统中,默认使用的是 Scene Delegate 来管理 App 的生命周期,首先要切回 AppDelegate 来管理 App 的生命周期
1、删除 Info.plist 文件中的 UIApplicationSceneManifest key;
2、在 @implementation AppDelegate 中 添加 @synthesize window = _window;
3、删除SceneDelegate.h,SceneDelegate.m,在 AppDelegate.m 中去掉 UISceneSession 相关的方法;
4、删除Main.storyboard,LaunchScreen.storyboard;
5、删除 Info.plist 文件中的Main storyboard file base name。

相关文章

网友评论

      本文标题:Xcode新建项目如何跟以前一样从代码启动

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