Swipe to Go Back Only Works on Edge of Screen

Swipe to go back only works on edge of screen?

Apple says here :

interactivePopGestureRecognizer

The gesture recognizer responsible for popping the top view controller
off the navigation stack. (read-only)

@property(nonatomic, readonly) UIGestureRecognizer
*interactivePopGestureRecognizer

The navigation controller installs this gesture recognizer on its view
and uses it to pop the topmost view controller off the navigation
stack. You can use this property to retrieve the gesture recognizer
and tie it to the behavior of other gesture recognizers in your user
interface. When tying your gesture recognizers together, make sure
they recognize their gestures simultaneously to ensure that your
gesture recognizers are given a chance to handle the event.

So SloppySwiper library customise the UIPanGestureRecognizer.

Check out the library SloppySwiper, which achieves this by using UIPanGestureRecognizer and by recreating the default animation.

SloppySwiper:- UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen like instagram.

Usage of this library can be found here.

Cocoapods:- pod "SloppySwiper"

I test this library on ios7 and above. It works like a charm.

React-Navigation increase swipe back area

You can increase swipe back area with this:

const stack = createStackNavigator({
Home,
...
}, {
...
navigationOptions: {
gestureResponseDistance: {horizontal: 100} // default is 25
}
})

Screen Edge Gesture Recognizer issue

Set a delegate to your UIScreenEdgePanGestureRecognizer,
implement shouldRecognizeSimultaneouslyWithOtherGestureRecognizer function
and return false.

How to disable swipe to go back in Microsoft Edge with javascript or jQuery?

This can be achieved with the touch-action CSS property. For each element whose gestures you want to prevent Edge from handling, set touch-action to none. Alternatively, you could set touch-action to none on a common ancestor, or, if you want to prevent Edge from handling any gesture, set it on the body.

If you only want to prevent Edge from going back to the previous page, by swiping, but want Edge to handle other gestures, you could set touch-action to pan-right pan-y pinch-zoom.

Example:

.reel-holder {
touch-action: none;
}

Swipe to go back gesture doesn't work properly in WatchOS

This is indeed a bug, which I, along with several other people, have reported it to Apple. Unfortunately, there is no way to disable this behavior currently.

react navigation v6 and v5, Disable swipe back action

You can set gestureEnabled to false in a screen like:

<AuthStack.Screen
name="Login"
component={Login}
options={{gestureEnabled: false}}
/>

Or the whole navigator like:

<AuthStack.Navigator screenOptions={{gestureEnabled: false}}>
...
</AuthStack.Navigator>


Related Topics



Leave a reply



Submit