I know there is a way to set background images for buttons using SDWebImage. But how do I set the image, i.e., foreground image? For normal state.
Asked
Active
Viewed 1,539 times
1
-
This question does not need to be closed anymore than http://stackoverflow.com/questions/19704334/setbackgroundimage-in-uibutton-using-sdwebimage. I didn't see the method. And the one with completion block was buggy. – learner Aug 26 '14 at 03:31
1 Answers
5
Did you look at UIButton+webCache.h
?
- (void)sd_setImageWithURL:(NSURL *)url forState(UIControlSTate)state;
is for the regular image and
- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState(UIControlSTate)state;
is for the background image.

Dima
- 23,484
- 6
- 56
- 83