Use native animations in TouchableBounce and TouchableOpacity
Summary: Now that native animations for opacity and springs have landed in both iOS and Android, we can enable native animations both for TouchableBounce and TouchableOpacity. Closes https://github.com/facebook/react-native/pull/10583 Differential Revision: D4099819 Pulled By: lacker fbshipit-source-id: 247d7bff9a778e520af764f571caf6286b4a5749
This commit is contained in:
parent
55ebb89916
commit
1bb323e256
|
@ -88,6 +88,7 @@ var TouchableBounce = React.createClass({
|
|||
toValue: value,
|
||||
velocity,
|
||||
bounciness,
|
||||
useNativeDriver: true,
|
||||
}).start(callback);
|
||||
},
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ var TouchableOpacity = React.createClass({
|
|||
setOpacityTo: function(value: number) {
|
||||
Animated.timing(
|
||||
this.state.anim,
|
||||
{toValue: value, duration: 150}
|
||||
{toValue: value, duration: 150, useNativeDriver: true}
|
||||
).start();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue