Skip to content

Instantly share code, notes, and snippets.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment