如何使用FLAnimatedImage检查动画结束? 我有这段代码:
@property (weak, nonatomic) IBOutlet FLAnimatedImageView *animatedImageView;
NSURL *url1 = [[NSBundle mainBundle] URLForResource:@"hand" withExtension:@"gif"];
NSData *data1 = [NSData dataWithContentsOfURL:url1];
FLAnimatedImage *animatedImage1 = [FLAnimatedImage animatedImageWithGIFData:data1];
self.animatedImageView.animatedImage = animatedImage1;
self.animatedImageView.contentMode = UIViewContentModeScaleAspectFit;
我想检测动画gif何时结束。我怎么能这样做?
答案 0 :(得分:1)
FLAnimatedImageView
自1.0.9起有loopCompletionBlock
,请参阅here。已添加到https://github.com/Flipboard/FLAnimatedImage/pull/60。