美文网首页
iOS中SDWebImage动态图加载

iOS中SDWebImage动态图加载

作者: 数字d | 来源:发表于2020-07-21 10:11 被阅读0次

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

 _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

相关文章

网友评论

      本文标题:iOS中SDWebImage动态图加载

      本文链接:https://www.haomeiwen.com/subject/probkktx.html