1.UIButton+WebCache UIImageView+WebCache

1.通过分类的方式,对外暴露接口。 
2.给分类添加属性,通过imageURLStorageKey值,将self 和 字典进行绑定。
 
通过sd_imageURLForState等方法进行取值。
 
3.调用UIView +WebCache 的sd_internalSetImageWithURL方法 ,设置operationKey值。
button 设置图片——>UIButtonImageOperation
button 设置背景图片 ——>UIButtonBackgroundImageOperation
 
 
UIImageView +webCache 也是做了同样的事情,只不过没有赋operationKey值。
MKAnnotationView +webCache
 
posted @ 2018-03-30 19:38  我是你们最爱的硕哥  阅读(336)  评论(0)    收藏  举报