Skip to content

Commit

Permalink
resolves SVProgressHUD#215. weakSelf not required. Using self here …
Browse files Browse the repository at this point in the history
…will not create a retain cycle as `self` here does not retain the animation block.
  • Loading branch information
ehuynh committed Oct 30, 2013
1 parent 07ff2f6 commit 2417bb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions SVProgressHUD/SVProgressHUD.m
Expand Up @@ -417,12 +417,11 @@ - (void)positionHUD:(NSNotification*)notification {
}

if(notification) {
SVProgressHUD *__weak weakSelf=self;
[UIView animateWithDuration:animationDuration
[UIView animateWithDuration:animationDuration
delay:0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[weakSelf moveToPoint:newCenter rotateAngle:rotateAngle];
[self moveToPoint:newCenter rotateAngle:rotateAngle];
} completion:NULL];
}

Expand Down

0 comments on commit 2417bb2

Please sign in to comment.