在我的应用中,我想播放一次动画,然后连续播放另一个。这是我的代码:
当我尝试此操作时,在第一个序列之后,程序会在onComplete中返回错误。
Animated.loop(
Animated.sequence([
Animated.parallel([
Animated.timing(
this.animState.opacityAnim,
{
toValue: 1,
duration: 2000,
delay: 500,
}
),
Animated.timing(
this.animState.tranlsY,{
toValue: 100,
duration: 2000,
delay: 500,
}
)
]),
{
iterations: 3,
}
]),
Animated.sequence([
Animated.timing(
this.animState.opacityAnim,
{
toValue: 0,
duration: 2000,
delay: 500,
}
),
Animated.timing(
this.animState.opacityAnim,
{
toValue: 1,
duration: 2000,
delay: 500,
}
),
])
).start();
如何运行第一个动画以及之后的第二个动画?