0
我想在動畫完成時做一些代碼。我該怎麼做? 我的例子:React-native:動畫完成時做一些代碼
showMsg(){
Animated.sequence([
Animated.timing(
this.state.bottom,
{
toValue: 0,
duration: 500
}),
Animated.delay(1000),
Animated.timing(this.state.bottom,
{
toValue: -50,
duration: 500
}),
]).start();
}
當最後一個動畫結束後我想這樣做代碼:
this.setState({
msg: '',
});
謝謝。