iOS13移除Main.storyboard
2020-03-26 本文已影响0人
VervertomJC
心血来潮,尝试swift大框架,以下是自己的尝试想通过纯代码构建,于是移除了storyboard文件,接着移除了target>General>Deployment Info > Main Interface

接着移除Info.plist中Application Scene Manifest>Scene Configuration>Application Session Role> Item0> Storyboard Name 项

接着在 ScenneDelegate
中
- (void)scene:(UIScene*)scenewillConnectToSession:(UISceneSession*)sessionoptions:(UISceneConnectionOptions*)connectionOptions;
键入 如下代码
self.window=UIWindow.init(windowScene: sceneas!UIWindowScene)
self.window?.rootViewController = MainTabbarController.init()
self.window?.makeKeyAndVisible()
然后就可以了,如果错误小伙伴请指出