canopas / UIPilot

The missing typesafe SwiftUI navigation library
https://canopas.github.io/UIPilot
MIT License
309 stars 27 forks source link

How to hide back button completely? #57

Open K4meko opened 3 months ago

K4meko commented 3 months ago

I tried:

case .GalleryScreen: GalleryView().navigationBarBackButtonHidden(true) }

But the back button still flickers on the start and then disappears. Thanks!

Zamorite commented 1 month ago

You may want to try .uipNavigationBarHidden(true) on your view.

e.g:

GalleryView()
    .uipNavigationBarHidden(true)

It's one of the View extensions provided by UIPilot

Zamorite commented 1 month ago

You should keep .navigationBarBackButtonHidden(true) if you also want to prevent people from popping routes using swipe gestures.

e.g:

GalleryView()
    .uipNavigationBarHidden(true)
    .navigationBarBackButtonHidden(true) // keep this