iOS 的高性能 GIF 動畫引擎:FLAnimatedImage

jopen 9年前發布 | 36K 次閱讀 iOS開發 移動開發 FLAnimatedImage

FLAnimatedImage是一個用于iOS的高性能GIF動畫引擎

  • 同時播放多個GIF格式與播放速度堪比桌面瀏覽器
  • Honors variable frame delays
  • 在內存壓力下表現正常
  • 循環播放過程中消除了延遲或阻止
  • Interprets the frame delays of fast GIFs the same way modern browsers do

It's a well-tested component that powers all GIFs in Flipboard. To understand its behavior it comes with an interactive demo:

Flipboard playing multiple GIFs

Who is this for?

  • Apps that don't support animated GIFs yet
  • Apps that already support animated GIFs but want a higher performance solution
  • People who want to tinker with the code (the corresponding blog post is a great place to start; also see the To Do section below)
FLAnimatedImage *image = [FLAnimatedImage animatedImageWithGIFData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://raphaelschaad.com/static/nyan.gif"]]];
FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init];
imageView.animatedImage = image;
imageView.frame = CGRectMake(0.0, 0.0, 100.0, 100.0);
[self.view addSubview:imageView];

項目主頁:http://www.baiduhome.net/lib/view/home/1425962219435

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!