ios – My undertaking has 2 navigation bar styes; default swiftui navbar and a customized one.Is there a solution to cover the swiftUI navigation bar at a sure level?

[ad_1]

I’m doing a undertaking the place I’m implementing the SwiftUI default navbar [navigation view and navigation link] after which I created my very own custome navbar for the remainder of the screens.

So, I’m utilizing the SwiftUI navbar for the login course of in my utility.
However after the consumer logs in, they’re taken to the homepage. That is the place I carried out my very own navigationBar type.

Now you see, I linked the login button with the homepage utilizing:
NavigationLink(vacation spot: HomepageView())

You see the place the issue is, it is like I am nesting 2 navigation views and so I am getting 2 navigation bars. I need to cover the default navigationBar that got here from the login course of.
So I attempted utilizing the [.navigationBarHidden(true)] but it surely doesn’t work in any respect.

Briefly, how do I implement 2 navigation Views [one default, one custome] the place I can use one for a bit of my app after which the opposite for one more part with out having them to collide like this.

One of the best i may discover was:

//added this to my HomepageView()
.navigationBarTitleDisplayMode(.inline)
.navigationBarHidden(true)

The navbar show mode adjustments to inline, however it’s nonetheless there 🙂

I am actually a newbie nonetheless, so are you able to please assist me.

[ad_2]

Leave a Reply