React Native Animated - 如何禁用默认缓动?
React Native Animated - How do you disable default easing?
如何删除应用于 Animated.timing 函数的默认缓动 (easeInOut)?出于某种原因,设置 ease: Easing.linear
不会删除默认的 easeInOut 计时。
Animated.timing(this.state.positionX, {
toValue: 1,
duration:1000,
ease: Easing.linear,
useNativeDriver: true,
}),
您的配置对象应显示为 easing
而不是 ease
。
Animated.timing(this.state.positionX, {
toValue: 1,
duration: 1000,
easing: Easing.linear,
useNativeDriver: true
});
如何删除应用于 Animated.timing 函数的默认缓动 (easeInOut)?出于某种原因,设置 ease: Easing.linear
不会删除默认的 easeInOut 计时。
Animated.timing(this.state.positionX, {
toValue: 1,
duration:1000,
ease: Easing.linear,
useNativeDriver: true,
}),
您的配置对象应显示为 easing
而不是 ease
。
Animated.timing(this.state.positionX, {
toValue: 1,
duration: 1000,
easing: Easing.linear,
useNativeDriver: true
});