How to hide NavigationView Bar in SwiftUI How to hide NavigationView Bar in SwiftUI swift swift

How to hide NavigationView Bar in SwiftUI


Seems that the solution could be adding a title or removing the space from safe area.

The problem:

enter image description here

Solution 1:

.navigationBarHidden(true).navigationBarTitle(Text("Home"))

Solution 2 (this seems be the best):

.navigationBarHidden(true).navigationBarTitle(Text("Home")).edgesIgnoringSafeArea([.top, .bottom])

enter image description here