Unhandled managed exception: Popped page does not appear on top of current navigation stack, please file a bug. (System.NotSupportedException)
at Xamarin.Forms.Platform.iOS.NavigationRenderer.OnPopViewAsync (Xamarin.Forms.Page page, System.Boolean animated) [0x00059] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:322
Description
If UIEdgeSwipe is stopped halfway , then the page hangs, you cant do it again ,however it remains on same page. If we click on soft back button instead of popping once its popping twice and crashed
Steps to Reproduce
Create PageRenderer for a content page
In the renderer
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
UIApplication.CheckForEventAndDelegateMismatches = false;
if (NavigationController != null)
{
if(NavigationController.InteractivePopGestureRecognizer is UIScreenEdgePanGestureRecognizer edgeReco)
{
if (!edgeReco.Enabled)
{
edgeReco.Enabled = true;
NavigationController.InteractivePopGestureRecognizer.Delegate = new NavDelegate();
}
else
{
NavigationController.SetNeedsUpdateOfScreenEdgesDeferringSystemGestures();
NavigationController.InteractivePopGestureRecognizer.Delegate = new NavDelegate();
}
}
}
}
Description
If UIEdgeSwipe is stopped halfway , then the page hangs, you cant do it again ,however it remains on same page. If we click on soft back button instead of popping once its popping twice and crashed
Steps to Reproduce
Create PageRenderer for a content page
In the renderer
Delegate
In any nav page use UiEdgeSwipe halfway through and return.
Click on Softback button. In the forms it shows Navigation Stack to be 2 , but however PopAsync() gets called twice internally.
Expected Behavior
Should retain state and not pop twice if Count is just 2
Actual Behavior
Popping page twice when Navigation stack is just 2 from iOS navigation renderer and causing the app to crash
Basic Information
Screenshots
Reproduction Link
XamarinFormsIssues/UISwipeBackIssue