Hide UINavigationController's navigationBar when the root controller is a UIHostingController
问题 I am struggling to hide the navigationBar , which would properly be hidden if the root controller wasn't a SwiftUI UIHostingController . I tried the following: Setting navigationController.isNavigationBarHidden = true after creating it, at viewDidLoad and viewWillAppear . Adding both .navigationBarHidden(true) and .navigationBarBackButtonHidden(true) for the UIHostingController 's rootView . Could it be an Apple bug? I am using Xcode 11.6. All my attempts together: class LoginController: