Believe in your own future, will thank yourself right now Sinner Yun

Sinner_Yun

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;
 
 
 
 

posted on 2017-09-02 18:51  Sinner_Yun  阅读(375)  评论(0编辑  收藏  举报

导航