I have four pages page 1-page 2-page 3-page 4.I use push modal async for navigating forward. When I tap button click in page 4 it is navigating to the page2. But tapping back bu
Please use await Navigation.PopModalAsync()
and read through this link to get info about ModalPages
.
EDIT:
Haven't tested it, but could help to understand the approach:
for (var i = Navigation.NavigationStack.Count - 1; i > 0; i--)
{
if (Navigation.NavigationStack[i] is Page2)
{
return;
}
await Navigation.PopModalAsync();
}