Merge pull request #8 from iAugux/augus/hide-home-indicator

Hide Home Indicator — Awesome
This commit is contained in:
zzanehip 2021-06-11 09:55:57 -04:00 committed by GitHub
commit 8cd9b402ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
let context = persistentContainer.viewContext
window.rootViewController = UIHostingController(rootView: contentView.environmentObject(MusicObserver()).environment(\.managedObjectContext, context))
window.rootViewController = HostingController(rootView: contentView.environmentObject(MusicObserver()).environment(\.managedObjectContext, context))
self.window = window
window.makeKeyAndVisible()
}
@ -85,3 +85,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}
private class HostingController<Content>: UIHostingController<Content> where Content: View {
override var prefersHomeIndicatorAutoHidden: Bool {
return true
}
}