Comments (16)
I'm pretty sure this is an iOS specific property, and defined by the
gesture itself, rather than JS logic.
On Sun, Feb 14, 2016 at 9:06 PM JV Lobo [email protected] wrote:
Hi there!
[image: untitled-1]
https://cloud.githubusercontent.com/assets/5671420/13036089/7704ae58-d35e-11e5-9390-f3fb36264773.pngI'm gonna try to explain it with an image.
Now, when I want to go back in my app with react-native-simple-router
by swiping, the area where I have to start swiping is really small (light
blue in the image). What I'd like to do is to make this area bigger (light
blue + dark blue in the image) to be able to start swiping easily.I don't know if it is possible.
Thanks!
—
Reply to this email directly or view it on GitHub
#50
.
from react-native-simple-router.
So do you think it is not possible to change it?
In Twitter, for example, you can swipe from a bigger area.
Thanks.
from react-native-simple-router.
@jvlobo seems that sceneconfig can be used to configure gestures, wanna take a look into this?
from react-native-simple-router.
Thanks for your answer @SEthX
I've been looking for some info in React Native doc but it seems like it doesn't provide so much information about SceneConfigs
Do you know how to set properties on that?
Thanks!
from react-native-simple-router.
You should be able to configure the SceneConfigs directly onto the Navigator, we may need to set some defaults
from react-native-simple-router.
Yeah, if you change the edgeHitWidth
variable to something larger that should fix it.
from react-native-simple-router.
Thanks for your help guys.
Should I change the variable directly in NavigatorSceneConfigs.js or could I set it in my code?
Thanks.
from react-native-simple-router.
Set it in your code as a scene config...
On Tue, Feb 16, 2016 at 9:59 PM JV Lobo [email protected] wrote:
Thanks for your help guys.
Should I change the variable directly in NavigatorSceneConfigs.js or
could I set it in my code?Thanks.
—
Reply to this email directly or view it on GitHub
#50 (comment)
.
from react-native-simple-router.
Thank for your help guys.
I've configured a Scene config as it sets here: https://rnplay.org/apps/HPy6UA
The thing is that in the example, they use a component. Because I'm using React Native Simple Router I set the configureScene in my component:
<Router firstRoute={dashboard} hideNavigationBar={true} noStatusBar={true} configureScene={this._configureScene}/>
I don't know if I'm doing something wrong, but it seems like it doesn't work.
Thanks for the help.
from react-native-simple-router.
I have the same issue with the swipe area. I was wondering how can I have my router configured such that it'll have the default iOS start swipe area width. I'm really new to to RN and mobile development and I would really appreciate if you could guide me step-by-step or show me some code.
from react-native-simple-router.
After some troubleshooting i found out how to configure the swipe area width.
I made this function
_configureScene() {
var newConfig = Navigator.SceneConfigs.PushFromRight;
newConfig.gestures.pop.edgeHitWidth = 50;
return newConfig;
}
and passed it as a prop to the router
configureScene={this._configureScene()}
from react-native-simple-router.
Hey @lucaboieru
Have you passed it like this:
<Router firstRoute={dashboard} hideNavigationBar={true} noStatusBar={true} configureScene={this._configureScene()}/>
I set the _configureScene()
function above my render function and passed it as a prop but it seems like it doesn't work
from react-native-simple-router.
@jvlobo that's how i passed the new config. You can try setting the edgeHitWidth
to something like 200 to see clearly if it works or not, because setting it to 50 like i did might seem like it does not work. If that still does not work we'll have to find another solution.
from react-native-simple-router.
Yes, I set something like 200 or 300 to test it, but it seems like it doesn't work! :/
This is my code: http://puu.sh/neY0J/16af6f15f2.png
from react-native-simple-router.
You have to call the function _configureScene
such that it will return to the prop the new configuration to be passed to the Navigator. Notice my ()
at the end.
from react-native-simple-router.
Ok, It was wrong!!
Solved.
Thank you so much :)
from react-native-simple-router.
Related Issues (20)
- Header: Back button text wraps HOT 5
- replaceRoute and resetToRoute No animation? HOT 1
- Twitter example red screen of death HOT 1
- Transition to another route with trans & hideNavigationBar & noStatusBar HOT 1
- multiple customAction in navigation stack
- LeftCorner in firstRoute
- "You are manually calling a React.PropTypes validation function for the..."
- custom navbar? HOT 2
- Trans:true no back button HOT 1
- Unable to fully hide navigation bar HOT 4
- Route management best practicies HOT 1
- Update NPM Version? HOT 2
- Show View after click on rightCorner icon
- make backbutton optional on android
- First Screen RIghtCorner Actions HOT 1
- Customize font for android navbar title HOT 2
- :bug: leftCorner offset titleComponent on Android HOT 1
- RightCorner doesn't work in firstRoute
- Trouble with sceneConfig HOT 2
- not supported by latest version of react-native HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-simple-router.