Writing an app with a next page function at the bottom. The user clicks the next page and it takes them to the next page in the book. Currently when the "next page" button is hit, in the top left corner there is a "back" button on the new page that is added by Apple on default. Is there a way I can hide this button programmatically, so that way I can have my own back page button at the bottom?
My navigation link for the next page is below if that helps:
NavigationLink(destination: mostDangerous2()) {
Text("Next Page")
.font(.title3)
.fontWeight(.bold)
.padding(.all)
.overlay(
RoundedRectangle(cornerRadius: 15)
.stroke(Color("maximumYellowRed"), lineWidth: 3)
)
}
.navigationBarBackButtonHidden(true)
.background(Color("gunMetal"))
Currently I have tried adding in .navigationBarBackButtonHidden(true) but this is not working. I have edited the asset color to match the background, but the button is still there and could potentially be clicked by a user - I feel like this is a sloppy solution. Any help appreciated