ios 在使用 SDWebimage UIButton setBackgroundimage
Posted Sinner_Yun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ios 在使用 SDWebimage UIButton setBackgroundimage相关的知识,希望对你有一定的参考价值。
解决方法 :
有法为此在 SDWebImage: SDWebImage / SDWebImage / UIButton+WebCache.h
导入此文件在您的类:
#import <SDWebImage/UIButton+WebCache.h>
使用此方法的任何一种:
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state;
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder;
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock;
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock;
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock;
以上是关于ios 在使用 SDWebimage UIButton setBackgroundimage的主要内容,如果未能解决你的问题,请参考以下文章
iOS网络——SDWebImage SDImageDownloader源码解析