iOS中SDWebImage动态图加载

以前没做过这个,第一次见,新奇

 _sImg = [[UIImageView alloc] init];
        NSString *filePath = [[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]] pathForResource:@"Packet" ofType:@"gif"];
        NSData *imageData = [NSData dataWithContentsOfFile:filePath];
        _sImg.image = [UIImage sd_imageWithGIFData:imageData];

实际开发中的使用:https://www.jianshu.com/p/064218531c27

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。