I am working on an application in Xamarin. The iOS feature of swipe back is not working and I don't know how to figure it out and fix it. Any kind of help will be appreciated. Where can I find this feature in my app code files and. how to enable or disable it?
self.navigationController.interactivePopGestureRecognizer.delegate = nil;
You can create a UIGestureRecognizerDelegate
, in this Delegate we can use an event called ShouldBegin()
to enable or disable the system back feature:
public class MyGestureDelegate : UIGestureRecognizerDelegate
{
public override bool ShouldBegin(UIGestureRecognizer recognizer)
{
return true;
}
}
Then assign the Delegate
to it:
NavigationController.InteractivePopGestureRecognizer.Delegate = new MyGestureDelegate();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.