Change UIImageView image half way of a flip animation

前端 未结 3 1756
天涯浪人
天涯浪人 2021-02-10 07:48

How can I change the image of a UIImageView on half way of a Flip animation. My code does seem to flip the UIImageView and successfully change the image but it is changing in an

3条回答
  •  既然无缘
    2021-02-10 08:36

    For Swift

    UIView.transition(with: imageView,
                      duration: 0.4,
                      options: UIView.AnimationOptions.transitionFlipFromLeft,
                      animations: {
                          imageView.image = newImage
            }, completion: nil)
    

提交回复
热议问题