mirror of
https://github.com/zzanehip/The-OldOS-Project.git
synced 2025-01-22 17:23:58 -05:00
auto hide home indicator
This commit is contained in:
parent
c263405292
commit
9a3c2d3385
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
|||
|
||||
}
|
||||
|
||||
class HostingController<Content>: UIHostingController<Content> where Content: View {
|
||||
override var prefersHomeIndicatorAutoHidden: Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue