Skip to content

Commit

Permalink
Position of Success/Error images are centered like the activity spinn…
Browse files Browse the repository at this point in the history
…er in case the status string is nil
  • Loading branch information
massimobio committed Feb 6, 2012
1 parent 7d25ec5 commit 050e899
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SVProgressHUD/SVProgressHUD.m
Expand Up @@ -209,7 +209,10 @@ - (void)setStatus:(NSString *)string {

self.hudView.bounds = CGRectMake(0, 0, hudWidth, hudHeight);

self.imageView.center = CGPointMake(CGRectGetWidth(self.hudView.bounds)/2, 36);
if(string)
self.imageView.center = CGPointMake(CGRectGetWidth(self.hudView.bounds)/2, 36);
else
self.imageView.center = CGPointMake(CGRectGetWidth(self.hudView.bounds)/2, CGRectGetHeight(self.hudView.bounds)/2);

self.stringLabel.hidden = NO;
self.stringLabel.text = string;
Expand Down

0 comments on commit 050e899

Please sign in to comment.