为了账号安全,请及时绑定邮箱和手机立即绑定

weex使用SDWebImage4.0不能显示动图

weex使用SDWebImage4.0不能显示动图

Qyouu 2018-10-04 10:25:07
- (id<WXImageOperationProtocol>)downloadImageWithURL:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)userInfo completed:(void(^)(UIImage *image,  NSError *error, BOOL finished))completedBlock {    return (id<WXImageOperationProtocol>)[[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:url] options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {    } completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {        if (completedBlock) {            completedBlock(image, error, finished);        }    }];}sd4.0的下载图片api和weex手册中示例不一样,有碰到相同问题的吗?
查看完整描述

2 回答

?
LEATH

TA贡献1936条经验 获得超6个赞

weex只是提让原生端来接管了展示图片的能力,实际以你的sd4.0的api为准

查看完整回答
反对 回复 2018-10-21
?
蝴蝶不菲

TA贡献1810条经验 获得超4个赞

工程里用了两个版本的SDWebImage,3.7.5专门用来下载weex中的图片。因为两个库中会有符号重复冲突,所以我对类名做了自动混淆。

查看完整回答
反对 回复 2018-10-21
  • 2 回答
  • 0 关注
  • 989 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信