Post

Replies

Boosts

Views

Activity

Reply to UIHostingController adds unremovable NavigationBar
After long attempts, I have the same behavior in my UIKit project and SwiftUI Views with UIHostingController as with just UIKit. In my storyboard, the UIHostingController is embedded in the NavigationController and this in turn is connected to the UITab Bar Controller. The first thing to do is to uncheck "Shows Navigation Bar" in the Attributes Inspector of the NavigationController. In the SwiftUI View I have the list in the NavigationView with the modifier .navigationBarTitle ("ViewTitle", displayMode: .large) and the next SwiftUI Views without NavigationView and the list with .navigationBarTitle ("SecondViewTitle", displayMode: .inline) modifier. The best solution for me.
Nov ’21