Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created October 11, 2019 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azamsharp/75efe7628cdf7377aa54c9233abc0ccd to your computer and use it in GitHub Desktop.
Save azamsharp/75efe7628cdf7377aa54c9233abc0ccd to your computer and use it in GitHub Desktop.
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
let userSettings = UserSettings()
let contentView = ContentView().environmentObject(userSettings)
window.rootViewController = UIHostingController(rootView: contentView)
self.window = window
window.makeKeyAndVisible()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment