I am doing a project where I am implementing the SwiftUI default navbar [navigation view and navigation link] and then I created my own custome navbar for the rest of the screens.
So, I am using the SwiftUI navbar for the login process in my application. But after the user logs in, they are taken to the homepage. This is where I implemented my own navigationBar style.
Now you see, I linked the login button with the homepage using: NavigationLink(destination: HomepageView())
You see where the problem is, it's like I'm nesting 2 navigation views and so I'm getting 2 navigation bars. I want to hide the default navigationBar that came from the login process. So I tried using the [.navigationBarHidden(true)] but it does not work at all.
In short, how do I implement 2 navigation Views [one default, one custome] where I can use one for a section of my app and then the other for another section without having them to collide like this.
The best i could find was:
//added this to my HomepageView() .navigationBarTitleDisplayMode(.inline) .navigationBarHidden(true)
The navbar display mode changes to inline, but it is still there :)
I'm really a beginner still, so can you please help me.