Tuesday, September 27, 2022
HomeiOS DevelopmentiOS SwiftUI - Take away high area and again button does not...

iOS SwiftUI – Take away high area and again button does not work


Your concern is that you’ve a number of NavigationViews.

NavigationView creates a brand new stack of views. Solely your most important view ought to have a NavigationView. The kid views can use NavigationLink to push new views, however they need to not create one other NavigationView.

Consider it like this. NavigationView creates that stack to carry the views, and NavigationLink pushes a brand new view onto the stack. You solely need to create one stack.

So, do away with NavigationView in your View above, as a result of it’s linked from the primary view which creates the NavigationView. Then, your code to cover the navigation bar will work as you count on.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular