From 1f0dae4271c835276a57652f8ed27ec9bee4ccb6 Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Mon, 18 Jul 2022 11:17:39 +1000 Subject: Pass through UIWindow to coordinator In case we need it later --- foray/SceneDelegate.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'foray/SceneDelegate.swift') diff --git a/foray/SceneDelegate.swift b/foray/SceneDelegate.swift index 1aabcd2..ed11dfe 100644 --- a/foray/SceneDelegate.swift +++ b/foray/SceneDelegate.swift @@ -20,13 +20,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { guard let windowScene = (scene as? UIWindowScene) else { return } let nav = UINavigationController() - - self.coordinator = ForayCoordinator(navigationController: nav) - self.coordinator?.start() - - self.window = UIWindow(windowScene: windowScene) - self.window?.rootViewController = nav - self.window?.makeKeyAndVisible() + + window = UIWindow(windowScene: windowScene) + window?.rootViewController = nav + window?.makeKeyAndVisible() + + coordinator = ForayCoordinator(window: window, navigationController: nav) + coordinator?.start() } func sceneDidDisconnect(_ scene: UIScene) { -- cgit