Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
...
class SceneDelegate: UIResponder, UIWindowSceneDelegate
{
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)
{
// Ventana...
let window = UIWindow(frame: UIScreen.main.bounds)
// Creamos el modelo...
let store = OperatingSystemStore()
// ...la vista, y la usamos para añadir el `store` al `environment`
window.rootViewController = UIHostingController(rootView: ContentView().environmentObject(store))
self.window = window
window.makeKeyAndVisible()
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.