Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-Navigation increase swipe back area

I am using the React-Navigation lib for my current project and dont like the swipe back function. It only gets triggered if you place your finger at the total edge of the screen for the gesture to swipe back. I have read the API Reference but could not found anything towards my problem with the behaviour.

like image 909
nixn Avatar asked Dec 03 '22 19:12

nixn


1 Answers

You can increase swipe back area with this:

const stack = createStackNavigator({
   Home,
   ...
}, {
   ...
   navigationOptions: {
      gestureResponseDistance: {horizontal: 100} // default is 25
   }
})
like image 146
KienLV Avatar answered Dec 06 '22 11:12

KienLV



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!