Workaround:
There are laws for this in sdwebimage:sdwebimage/sdwebimage/uibutton+webcache.h
Import this file in your class:
#import <SDWebImage/UIButton+WebCache.h>
Use any of this method:
- (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< Span class= "pun" >) setbackgroundimagewithurl:(nsurl *) url forstate:(uicontrolstate state placeholderimage:(uiimage *) placeholder options:( Sdwebimageoptions options completed:( Sdwebimagecompletedblockcompletedblock; /span>
iOS is using sdwebimage UIButton setbackgroundimage