funcscene(_scene: UIScene, willConnectTosession: UISceneSession, optionsconnectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). if#available(iOS13.0, *) { window?.overrideUserInterfaceStyle = .light } guardlet_= (scene as?UIWindowScene) else { return } //從Scene啟動ViewController iflet windowScene = scene as?UIWindowScene { let window =UIWindow(windowScene: windowScene) window.rootViewController =SwiftUIViewController() self.window = window window.makeKeyAndVisible() } } }