I'm trying to support Scenes in my app. One library that I use has a UIWindow subclass for triggering debug gestures anywhere in the app. In my pre-Scenes app I had code like this to sometimes use that subclass:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
let window: UIWindow
if ScribbleTweaks.enabled {
window = TweakWindow(frame: UIScreen.main.bounds, gestureType: .shake, tweakStore: ScribbleTweaks.defaultStore)
} else {
window = UIWindow(frame: UIScreen.main.bounds)
}
window.rootViewController = navController
window.makeKeyAndVisible()
...
}
Is there any way to do something similar with a UIWindowSceneDelegate? I can't find any API for configuring the UIWindow class.
As a follow-up, is it possible to use UIWindowScene without storyboards? Currently I don't use storyboards and it would be nice to port over the same code for configuring the initial view controllers.