Skip to content

Commit

Permalink
Set placeholder on all UIButton stats (fix #120)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Poitrey committed May 14, 2012
1 parent b6e0630 commit eff6cac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SDWebImage/UIButton+WebCache.m
Expand Up @@ -29,6 +29,9 @@ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder opt
[manager cancelForDelegate:self];

[self setImage:placeholder forState:UIControlStateNormal];
[self setImage:placeholder forState:UIControlStateSelected];
[self setImage:placeholder forState:UIControlStateHighlighted];


if (url)
{
Expand All @@ -55,6 +58,8 @@ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder opt
[manager cancelForDelegate:self];

[self setImage:placeholder forState:UIControlStateNormal];
[self setImage:placeholder forState:UIControlStateSelected];
[self setImage:placeholder forState:UIControlStateHighlighted];

if (url)
{
Expand Down

0 comments on commit eff6cac

Please sign in to comment.