SceneDelegate.swift 838 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // SceneDelegate.swift
  3. // FLEXample
  4. //
  5. // Created by Tanner on 3/11/20.
  6. // Copyright © 2020 Flipboard. All rights reserved.
  7. //
  8. import UIKit
  9. import SwiftUI
  10. @objcMembers @available(iOS 13.0, *)
  11. class SceneDelegate: UIResponder, UIWindowSceneDelegate {
  12. var window: UIWindow?
  13. func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
  14. if let windowScene = scene as? UIWindowScene {
  15. let window = UIWindow(windowScene: windowScene)
  16. window.rootViewController = FLEXNavigationController(rootViewController: CommitListViewController())
  17. self.window = window
  18. window.makeKeyAndVisible()
  19. }
  20. }
  21. func sceneDidBecomeActive(_ scene: UIScene) {
  22. FLEXManager.shared.showExplorer()
  23. }
  24. }