Giter Site home page Giter Site logo

Comments (16)

davidLeonardi avatar davidLeonardi commented on May 13, 2024

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.png

I'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.

jvlobo avatar jvlobo commented on May 13, 2024

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.

davidLeonardi avatar davidLeonardi commented on May 13, 2024

@jvlobo seems that sceneconfig can be used to configure gestures, wanna take a look into this?

from react-native-simple-router.

jvlobo avatar jvlobo commented on May 13, 2024

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.

ericraio avatar ericraio commented on May 13, 2024

You should be able to configure the SceneConfigs directly onto the Navigator, we may need to set some defaults

from react-native-simple-router.

liamzebedee avatar liamzebedee commented on May 13, 2024

Yeah, if you change the edgeHitWidth variable to something larger that should fix it.

from react-native-simple-router.

jvlobo avatar jvlobo commented on May 13, 2024

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.

davidLeonardi avatar davidLeonardi commented on May 13, 2024

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.

jvlobo avatar jvlobo commented on May 13, 2024

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.

lucaboieru avatar lucaboieru commented on May 13, 2024

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.

lucaboieru avatar lucaboieru commented on May 13, 2024

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.

jvlobo avatar jvlobo commented on May 13, 2024

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.

lucaboieru avatar lucaboieru commented on May 13, 2024

@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.

jvlobo avatar jvlobo commented on May 13, 2024

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.

lucaboieru avatar lucaboieru commented on May 13, 2024

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.
screenshot 2016-02-20 19 18 12

from react-native-simple-router.

jvlobo avatar jvlobo commented on May 13, 2024

Ok, It was wrong!!

Solved.

Thank you so much :)

from react-native-simple-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.