Last active
August 29, 2015 14:18
-
-
Save shazron/e45705f76bef4448139a to your computer and use it in GitHub Desktop.
CB-7204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__weak __typeof(self) weakSelf = self; | |
[UIView transitionWithView:self.viewController.view | |
duration:fadeDuration | |
options:UIViewAnimationOptionTransitionNone | |
animations:^(void) { | |
__typeof(self) strongSelf = weakSelf; | |
if (strongSelf != nil) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[strongSelf->_activityView setAlpha:0]; | |
[strongSelf->_imageView setAlpha:0]; | |
}); | |
} | |
} | |
completion:^(BOOL finished) { | |
if (finished) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[weakSelf destroyViews]; | |
}); | |
} | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment