34 lines
865 B
Swift
34 lines
865 B
Swift
import UIKit
|
|
import SwiftUI
|
|
|
|
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
var window: UIWindow?
|
|
|
|
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
|
|
|
let contentView = MainView()
|
|
|
|
if let windowScene = scene as? UIWindowScene {
|
|
let window = UIWindow(windowScene: windowScene)
|
|
window.rootViewController = UIHostingController(rootView: contentView)
|
|
self.window = window
|
|
window.makeKeyAndVisible()
|
|
}
|
|
}
|
|
|
|
func sceneDidDisconnect(_ scene: UIScene) {
|
|
}
|
|
|
|
func sceneDidBecomeActive(_ scene: UIScene) {
|
|
}
|
|
|
|
func sceneWillResignActive(_ scene: UIScene) {
|
|
}
|
|
|
|
func sceneWillEnterForeground(_ scene: UIScene) {
|
|
}
|
|
|
|
func sceneDidEnterBackground(_ scene: UIScene) {
|
|
}
|
|
}
|
|
|