Skip to content

Commit

Permalink
Make window a stored property
Browse files Browse the repository at this point in the history
Fixes a console warning
"UIWindows were created prior to initial application activation. This may result in incorrect visual appearance."
  • Loading branch information
Carl Hill-Popper committed Oct 22, 2021
1 parent bf3147f commit 556016b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Example/WindowController.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit

@UIApplicationMain final class WindowController: UIResponder {
var window: UIWindow? = {
lazy var window: UIWindow? = {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = UINavigationController(rootViewController: ViewController())
return window
Expand Down

0 comments on commit 556016b

Please sign in to comment.