How to hide SwiftUI NavigationBar
Problem
When playing with SwiftUI NavigationView I have came across multiple issues. One of them was how to hide navigation bar on specific view.
Solution
Hide NavigationBar
Using just .navigationBarHidden(true) just doesn’t work. For some crippled reason you have to add also .navigationBarTitle(“”) .
Bonus 1: Hide NavigationBar when app is reopened from Background
You think you have won this battle? NO. When you close and reopen the app on this view, you will NavigationBar is presented again. I din’t find better solution yet, so here is ugly one.
Bonus 2: Get you NavigationBar under control
NavigationView dynamic background color in SwiftUI
iOS Elements
You can find also the whole implementation in my UI kit — Download below.
Use discount code MOLCIK to get iOS Elements for $29.70 (70% off)