Open lowryrussell opened 9 months ago
I'm also interested in this!
@lowryrussell I had to clone the repository and make my own implementation for that, i changed the base code, if you're interested i can share with you how i did it
@obaida-mostarihi I'm interested as well. Could you please share?
@trinvh First of all i don't recommend using this library since it does not support new ios versions, it's so outdated it has a lot of navigation bugs, it's still using NavigationView instead of NavigationStack, but here's how you can add the hideBackButton:
once you fork the repository go to the package in folder "NavigationCoordinatable" and file "NavigationCoordinatable" add to the protocol this line
var navigationBarHidden: Bool { get }
in the same class you'll find an extension for NavigationCoordinatable add this line
var navigationBarHidden: Bool {
return false
}
then in "PresentationHelper" file under "NavigationCoordinatable" folder, inside the switch statement find case .push and change it into the following:
if presentable is AnyView {
let view = AnyView(NavigationCoordinatableView(id: nextId, coordinator: coordinator))
self.presented = Presented(
view: AnyView(view.navigationBarBackButtonHidden(coordinator.navigationBarHidden)),
type: .push
)
} else {
self.presented = Presented(
view: AnyView(presentable.view().navigationBarBackButtonHidden(coordinator.navigationBarHidden)),
type: .push
)
}
Anyone have a custom navigation back button implementation they're willing to share?