From 2417bb284cfcaebf860f4b6de78ce33923b6b208 Mon Sep 17 00:00:00 2001 From: Edward Huynh Date: Wed, 30 Oct 2013 21:42:45 +1100 Subject: [PATCH] resolves #215. weakSelf not required. Using `self` here will not create a retain cycle as `self` here does not retain the animation block. --- SVProgressHUD/SVProgressHUD.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SVProgressHUD/SVProgressHUD.m b/SVProgressHUD/SVProgressHUD.m index dbf988aa..fe6cc8ef 100644 --- a/SVProgressHUD/SVProgressHUD.m +++ b/SVProgressHUD/SVProgressHUD.m @@ -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]; }