I’m currently using standard navigation methods instead of Shell Navigation in my application. I intended to incorporate iOS swipe back navigation, expecting it to function by default. However, it’s not working as anticipated. I came across some threads discussing this issue, such as:
I attempted to use this code on the following page to enable swipe back navigation, but unfortunately, it didn’t function as intended:
So my current navigation flow goes like this:
MainPage = new NavigationPage(new Page1());
From Page1:
async void Button_Clicked(System.Object sender, System.EventArgs e)
{
await Navigation.PushAsync(new Page2());
}
On Page2’s OnAppearing():
protected override void OnAppearing()
{
base.OnAppearing();
#if IOS
UINavigationController vc = (UINavigationController)Platform.GetCurrentUIViewController();//using UIKit, find the UINavigationController
vc.InteractivePopGestureRecognizer.Enabled = true;
#endif
}