Skip to content

Instantly share code, notes, and snippets.

@shazron
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shazron/e45705f76bef4448139a to your computer and use it in GitHub Desktop.
Save shazron/e45705f76bef4448139a to your computer and use it in GitHub Desktop.
CB-7204
__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