Skip to content

Commit 6037232

Browse files
committed
fix run is black
1 parent 609fc39 commit 6037232

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Example/Example/SceneDelegate.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
1515

1616

1717
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
18-
19-
let window = UIWindow(frame: UIScreen.main.bounds)
18+
if let windowScene = scene as? UIWindowScene {
19+
let window = UIWindow(windowScene: windowScene)
2020
window.rootViewController = UIHostingController(rootView: ContentView())
2121
self.window = window
2222
window.makeKeyAndVisible()
23+
}
2324
}
2425

2526
func sceneDidDisconnect(_ scene: UIScene) {

0 commit comments

Comments
 (0)