I have a large iOS app with swift and XIBs for the view controllers. Now I'm progressively migrating from XIBs/View controllers to SwiftUI but I don't know how to solve a specific problem.
Some XIB/View controllers have a navigation bar, if these XIB/controllers push a SwiftUI view the SwiftUI view appears correctly with its content and the navigation bar inherited from its parent XIB view. But some of the SwiftUI views need to change some of the inherited navigation bar buttons and I don't know how to access from the SwiftUI code to the navigation bar content.
I tried to hide the inherited navigation bar using
.navigationBarTitle("")
.navigationBarHidden(true)
(which is working) and creating a SwiftUI navigationbar using NavigationView component, but:
I don't know if this is the correct approach.
Using this NavigationView component the new navigation bar shown is much higher than the inherited navigation bar. Why is it showing a much higher navbar? Could I change this heght and how?
Thank you!
init()then access the traditional UIKit style navigation modifications.