📜  如何从程序化视图开始 swift 代码示例

📅  最后修改于: 2022-03-11 15:01:01.645000             🧑  作者: Mango

代码示例1
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {    
    guard let winScene = (scene as? UIWindowScene) else { return }
    window = UIWindow(windowScene: winScene)
    window?.rootViewController = ViewController()
    window?.makeKeyAndVisible()
}