RN动画实现

一、动画使用

constructor(props) {

    super(props);

    this.state = {

      // 1. 初始化动画值

      opacity: new Animated.Value(0)

    };

}

render() {

    return (

     

       

          style={{

            // 2. 将动画值绑定到style的属性:opacity透明度

            opacity: this.state.fadeAnim,

          }}

        >

          RN的动画使用

       

       

你可能感兴趣的:(RN动画实现)