【发布时间】:2014-08-12 05:38:07
【问题描述】:
我正在使用uiimage-from-animated-gif 库通过UIImage 显示动画GIF。它工作正常,但我需要在转一圈后停止动画或停止显示imageView2。
我使用以下代码为 GIF 制作动画:
NSURL *url2 = [[NSBundle mainBundle] URLForResource:@"dove-animate" withExtension:@"gif"];
self.imageView2.image = [UIImage animatedImageWithAnimatedGIFData:[NSData dataWithContentsOfURL:url2]];
【问题讨论】:
-
你试过设置
self.imageView2.animationRepeatCount吗? -
imageview.animationrepeatcount 没有变化
-
如果你可以将 gif 图像拆分为多个图像,并将它们放入 UIImageView 中,那么它会起作用,但不确定是否取决于你.. 否则不确定抱歉
标签: objective-c cocoa-touch uiimage