Files
SwiftUI/Examples/Combine using GitHub API/SwiftUI-Combine-Example/SceneDelegate.swift
2019-06-06 11:16:28 +03:00

16 lines
526 B
Swift
Executable File

import UIKit
import SwiftUI
final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = UIHostingController(
rootView: SearchUserView().environmentObject(SearchUserViewModel())
)
self.window = window
window.makeKeyAndVisible()
}
}