-
-
Save fitomad/ea1b06abcfcae0ccc22c125d2063c21c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use a UIHostingController as window root view controller | |
if let windowScene = scene as? UIWindowScene | |
{ | |
let window = UIWindow(windowScene: windowScene) | |
// Variable de entorno para `managedObjectContext` | |
// Es necesario para luego usar `@FetchRequest` en | |
// las vistas. | |
let sessionView = SessionsView() | |
.environment(\.managedObjectContext, DataManager.shared.managedObjectContext) | |
window.rootViewController = UIHostingController(rootView: sessionView) | |
self.window = window | |
window.makeKeyAndVisible() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment