swift 自定义rootViewController

SceneDelegate中

let windowScene = UIWindowScene.init(session: session, connectionOptions: connectionOptions)        self.window = UIWindow(windowScene: windowScene)     

self.window?.frame = UIScreen.main.bounds; 

 self.window?.rootViewController = MainTabBarController();  

 self.window?.makeKeyAndVisible()

你可能感兴趣的:(swift 自定义rootViewController)