如何为 UIImageView 中的图像变化设置动画? - How to animate the change of image in an UIImageView?

10/14 10:50
阅读数 0

问题:

I have an UIImageView with an image.我有一个带有图像的UIImageView Now I have a completely new image (graphic file), and want to display that in this UIImageView .现在我有一个全新的图像(图形文件),并想在这个UIImageView显示它。 If I just set如果我只是设置

myImageView.image = newImage;

the new image is visible immediately.新图像立即可见。 Not animatable.不可动画。

I want it to nicely fade into the new image.我希望它很好地淡入新图像中。 I thought maybe there's a better solution than just creating a new UIImageView on top of that and blending with animation?我想也许有更好的解决方案,而不仅仅是在其上创建一个新的UIImageView并与动画混合?


解决方案:

参考一: https://en.stackoom.com/question/BtOv
参考二: https://stackoom.com/question/BtOv
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部