SDWebImage4.0之前

     UIImageView *imgView = [UIImageView new];
imgView.contentMode = UIViewContentModeScaleAspectFit;
imgView.frame = CGRectMake(, , , ); NSString *filePath = [[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]]pathForResource:@"going" ofType:@"gif"];
NSData *imageData = [NSData dataWithContentsOfFile:filePath];
imgView.backgroundColor = [UIColor clearColor];
imgView.image = [UIImage sd_animatedGIFWithData:imageData];
[self addSubview:imgView];

SDWebImage4.0之后

     FLAnimatedImageView *imgView = [FLAnimatedImageView new];
imgView.contentMode = UIViewContentModeScaleAspectFit;
imgView.frame = CGRectMake(, , , );
NSString *filePath = [[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]]pathForResource:@"going" ofType:@"gif"];
NSData *imageData = [NSData dataWithContentsOfFile:filePath];
imgView.backgroundColor = [UIColor clearColor];
imgView.animatedImage = [FLAnimatedImage animatedImageWithGIFData:imageData];
[self addSubview:imgView];

SDWebImage4.0之后加载gif不显示的解决方案的更多相关文章

  1. [ActionScript 3.0] AS3.0 动态加载显示内容

    可以将下列任何外部显示资源加载到 ActionScript 3.0 应用程序中: 在 ActionScript 3.0 中创作的 SWF 文件 — 此文件可以是 Sprite.MovieClip 或扩 ...

  2. ie6,7下js动态加载图片不显示错误

    ie6,7下js动态加载图片不显示错误 先描述一下出现这种匪夷所思bug的背景: 我在页面加载的时候加载一堆小缩略图,<a href="javascript:void(0);" ...

  3. 在页面未加载完之前显示loading动画

    在页面未加载完之前显示loading动画 这里有很多比这篇博客还优秀的loading动画源码 我还参考这篇博客 loading动画代码demo 我的demo预览 <!DOCTYPE html&g ...

  4. Fullcalendar改版后发布到IIS或者tomcat里面前端加载数据不显示的问题

    问题如题:Fullcalendar改版后发布到IIS或者tomcat里面前端加载数据不显示的问题 解决办法:通过火狐浏览器工具发现是时间格式不对的原因,需要将时间格式修改为:yyyy-MM--DD   ...

  5. vue项目未加载完成前显示loading...

    1.在Index.html里面加入loading的元素,让loading元素显示,让app元素隐藏 <!DOCTYPE html> <html> <head> &l ...

  6. IE8中jQuery.load()加载页面不显示的原因

    一.jQuery.load() jQuery.load(url,[data],[callback])通过Ajax异步请求加载服务器中的数据,并把数据放到指定元素中. url :请求服务器的地址 dat ...

  7. C#连接Sqlite 出现:混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。的解决方案

    C#连接Sqlite 出现: 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集.的解决方案 C#连接sqlite数据库代码 ...

  8. Thinkphp5.0怎么加载css和js

    Thinkphp5.0怎么加载css和js 问题 http://localhost/手册上的那个{load href="/static/css/style.css" /} 读取不到 ...

  9. mybatis plus3.1.0 热加载mapper

    今天又开始写业务代码了,每次修改SQL都要重启服务,实在是浪费时间. 想起之前研究过的<mybatis plus3.1.0 热加载mapper>,一直没有成功,今天静下心来分析了问题,终于 ...

随机推荐

  1. nfs 所有的版本的 RFC 整理; nfs 所有版本对比;

    下面是针对 nfs 所有的版本,我们可以通过不同的RFC 进行详细看其RFC的细节来进行对比: 下面是备忘一些NFS RFC 的链接: https://datatracker.ietf.org/doc ...

  2. 2019年Java面试题基础系列228道(3)

    51.类 ExampleA 继承 Exception,类 ExampleB 继承ExampleA. 有如下代码片断: try { throw new ExampleB("b")}c ...

  3. tl-wr742n无线路由器怎么设置

    tl wr742n无线路由器的设置方法如下: 1.宽带总线(猫出来的网线)连接路由器的WAN口. 2.将网线一头连接路由器任意LAN口,一头连接电脑,启动电脑和路由器设备,也可以通过手机连接无线路由器 ...

  4. mac环境 python3.7 lzma.py 报错解决

    import pandas as pd 在使用pandas时报Could not import the lzma module解决方法: 1.安装了 backports.lzma pip3 insta ...

  5. Custom Diagrams

    Custom Diagrams https://github.com/dbeaver/dbeaver/wiki/Custom-Diagrams You can create custom ER dia ...

  6. Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'type' for exchange 'me

    在启动RabbitMQ消费端的时候报错:Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol ...

  7. August 18th, 2019. Week 34th, Sunday

    Fear doesn't shut you down, it wakes you up. 恐惧不会消磨你的意志,它能激发你的潜能. We all know that fear is powerful, ...

  8. win10+Ubuntu16.04双系统下深度学习环境的搭建

    环境零零碎碎地搭了三四天,虽然碰到各种问题,但还是搭建好了,自己整理记录下,同时也算给有需要的人一些指导吧 一.双系统的安装 Win10硬盘管理助手 压缩或者直接利用未使用的空间,空间大小自定,将腾出 ...

  9. 八、VTK安装并运行一个例子

    一.版本 win10 VS2019 VTK8.2.0 其实vtk的安装过程和itk的安装过程很是类似,如果你对itk的安装很是熟悉(也就是我的博客一里面的内容,那么自己就可以安装.) 如果不放心,可以 ...

  10. git 删除文件/移动文件

    1.git rm 删除文件 git restore --file (git老版本:git checkout) git rm --file(本地和管理都已删除) git rm --cached file ...