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的使用

iOS利用SDWebImage图片下载缓存

IOS SDWebImage实现原理详解

iOS网络——SDWebImage SDImageDownloader源码解析

iOS网络——SDWebImage SDImageDownloader源码解析

iOS开发SDWebImage的基本使用