SwiftUI Hide Status Bar

Viewed 147

I'm having a very frustrating time trying to hide the status bar in iOS 14 with the latest XCode 12, etc...

I've tried every solution I can find on the net and nothing will work...

The status bar easily hides on a screen with no NavigationView...but it won't work period with it.

I've tried so many variations of view controller solutions, SwiftUI solutions, but it won't work...including any level in the view hierarchy.

I'm basically trying to turn it off temporarily when showing a full screen photo modal with .fullScreenCover(isPresented: $isPresentedFullScreen) {...

The latest code I tried was

.edgesIgnoringSafeArea(.all)
.navigationBarHidden(true)
.statusBar(hidden: true)

Anyone have a working solution to this?

0 Answers
Related