【问题标题】:How can I check the end of animation using FLAnimatedImage如何使用 FLAnimatedImage 检查动画的结束
【发布时间】:2015-02-19 02:59:28
【问题描述】:

如何使用 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 何时结束。我该怎么做?

【问题讨论】:

  • 结束问题。我实现了协议和委托,并且可以检查这一点。

标签: ios xcode animation gif animated-gif


【解决方案1】:

FLAnimatedImageView 从 1.0.9 开始具有 loopCompletionBlock,请参阅 here。已添加到https://github.com/Flipboard/FLAnimatedImage/pull/60。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-06-05
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 2014-11-27
    • 1970-01-01
    • 2016-10-20
    • 1970-01-01
    相关资源
    最近更新 更多