Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeckSwiper flickers with native animations[iOS][0.38] #334

Closed
thorbenandresen opened this issue Nov 30, 2016 · 0 comments
Closed

DeckSwiper flickers with native animations[iOS][0.38] #334

thorbenandresen opened this issue Nov 30, 2016 · 0 comments
Assignees

Comments

@thorbenandresen
Copy link

If I enable nativeAnimations and add useNativeDriver: true to the config object of the Animated.spring() and Animated.timing() functions, then the cards will flicker while swiping.

I think the problem is explained here. However I was not able to come up with a workaround. Do you have any ideas?

FYI: Animated.decay() does not yet support native animations, so I left it as it is. However I set a new animated value in the callback of Animated.spring() in the onPanResponderRelease method like below in order to avoid the app to crash in certain edge cases.

     Animated.spring(this.state.pan, {
                        toValue: {x: 0, y: 0},
                        friction: 4,
                         useNativeDriver: true,
                    }).start(() => this.setState({pan: new Animated.ValueXY()}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants