Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.