美文网首页
UIImageView :fileURLWithPath和ima

UIImageView :fileURLWithPath和ima

作者: 恒_sir | 来源:发表于2016-08-02 14:43 被阅读35次

使用SDWebImage的

[avatorImageView setImageWithURL:[NSURL fileURLWithPath:self.dataSource[0]]];在使用这个时,只能更新一次头像;

解决方法还是改成下面这个方法才能不断更新头像:

avatorImageView.image= [UIImage imageWithContentsOfFile:self.dataSource[0]];

相关文章

网友评论

      本文标题:UIImageView :fileURLWithPath和ima

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