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
*interactivePopGestureRecognizerThe 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
Not Getting the Email Using Google Authentication in Firebase
How to Animate Changing a Uilabel's Textalignment
Sequence Animation Using Caanimationgroup
Where Does a Swift iOS Application Begin Its Life
Wkwebview and Uimenucontroller
Possible to Send Automated Email
Get Height of iOS Keyboard Without Displaying Keyboard
#If Canimport() Does Not Find Frameworks with Cocoapods
Passing Data Between Two Viewcontrollers (Delegate) - Swift
Prepare(For Segue: Uistoryboardsegue, Sender: Anyobject) Missing in Swift 3.0/Xcode 8 B6
How to Create the Current Date (Or Any Date) as an Nsdate Without Hours, Minutes and Seconds
Iterate Over All the Uitablecells Given a Section Id
Swipe to Go Back Only Works on Edge of Screen
Member Operator '%' Must Have at Least One Argument of Type 'Viewcontroller'
Firebase - How to Get the Key Value in Observeeventtype = Value
How to Save Tableview Cell's Checkmark After Reload View Use Nsuserdefaults
Supporting Multiple Screen Sizes in Storyboards (3.5 and 4 Inch Screens)