Last active
July 26, 2019 08:02
-
-
Save Dimillian/cb275e4f7563397ed6f6cdd5670d003a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
var window: UIWindow? | |
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
let controller = UIHostingController(rootView: | |
StoreProvider(store: store) { | |
HomeView() | |
}) | |
window.rootViewController = controller | |
self.window = window | |
window.makeKeyAndVisible() | |
} | |
} | |
} | |
private let store = Store<AppState>(reducer: appStateReducer, | |
middleware: [loggingMiddleware], | |
state: AppState()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment