My console posted this error today, [ApplicationLifecycle] UIWindows were created prior to initial application activation. This may result in incorrect visual appearance.
This has caused Application UI to not behave properly. I have never seen this before and need some insight on where to start debugging.
macOS: Catalina 10.15
XCode version: Version 11.1
I think that apps main UIWindow
should be lazily initiated. Try with this:
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
lazy var window: UIWindow? = UIWindow(frame: UIScreen.main.bounds)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window?.rootViewController = RootViewController() // root view controller
window?.makeKeyAndVisible()
return true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With