UIImageView动画不保留最后一帧 [英] UIImageView Animation not keep last frame

查看:42
本文介绍了UIImageView动画不保留最后一帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此方法为 UIImageView 制作动画:

I am using This methods to animate an UIImageView :

    [imageView stopAnimating];
    imageView.animationImages = set;
    imageView.animationDuration = 0.4;
    imageView.animationRepeatCount = 1;
    [imageView startAnimating];

设置为图像的 NSMutableArray

.我的问题是,动画制作完成后,UIImageView不会保留 set 中的最后一帧,并带回动画之前imageview中的图像.

that set is NSMutableArray of the images. my problem is that when the animation finished, the UIImageView not keep the last frame from set and bring back the image that was in the imageview before the animation.

如何使最后一帧成为imageview的图像?

how i can make the last frame to be the image of the imageview?

推荐答案

开始制作动画之前,请在图像视图中设置最后一张图像.然后开始动画.动画完成后,图像视图将显示yourLastImage.

Before you start animating, set the last image in the image view imageView.image = yourLastImage; and then start the animation. After the animation is complete the image view will show yourLastImage.

这篇关于UIImageView动画不保留最后一帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆