如何删除应用于Animated.timing函数的默认缓动(easeInOut)?出于某种原因,设置ease: Easing.linear
不会删除默认的easeInOut计时。
Animated.timing(this.state.positionX, {
toValue: 1,
duration:1000,
ease: Easing.linear,
useNativeDriver: true,
}),
答案 0 :(得分:3)
您的配置对象应该是easing
而不是ease
。
Animated.timing(this.state.positionX, {
toValue: 1,
duration: 1000,
easing: Easing.linear,
useNativeDriver: true
});