Files
swift-composable-architectu…/Examples/CaseStudies/UIKitCaseStudies/SceneDelegate.swift
Brandon Williams d2240d0e76 The Composable Architecture
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2020-05-03 22:26:28 -07:00

28 lines
731 B
Swift

import SwiftUI
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
self.window = (scene as? UIWindowScene).map(UIWindow.init(windowScene:))
self.window?.rootViewController = UINavigationController(
rootViewController: RootViewController())
self.window?.makeKeyAndVisible()
}
}
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
true
}
}