1.选中项目-->Generral-->Deployment-->Main Interface 设为空
image.png
2.删除Main.storyboard 文件--
image.png
3.删除info.plist下的Main.storyboard 描述(注意文件位置)
image.png
4.注意设置根视图的代码移动到了SceneDelegate.swift中了
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window?.windowScene = windowScene
window?.backgroundColor = UIColor.white
window?.makeKeyAndVisible()
window?.rootViewController = TabBarViewController()
}
网友评论