Animated开启动画数组

151 阅读1分钟
   Animated.parallel([
      Animated.timing(animRight2Center, {
        toValue: 1,
        useNativeDriver: true,
        duration: 500,
      }),
      Animated.timing(animCenter, {
        toValue: 3,
        useNativeDriver: true,
        duration: 500,
      }),
    ]).start(() => {
      this.animing = false;
      onIndexChange(activeIndex + 1);
      animRight2Center.setValue(0);
      animCenter.setValue(0);
      animLeft2Center.setValue(0);
    });