CB-8836 - Crashes after animating splashscreen
This commit is contained in:
parent
35272415d3
commit
559b300d29
@ -289,19 +289,28 @@
|
||||
} else if (fadeDuration == 0) {
|
||||
[self destroyViews];
|
||||
} else {
|
||||
[UIView transitionWithView:self.viewController.view
|
||||
duration:fadeDuration
|
||||
options:UIViewAnimationOptionTransitionNone
|
||||
animations:^(void) {
|
||||
[_imageView setAlpha:0];
|
||||
[_activityView setAlpha:0];
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
if (finished) {
|
||||
[self destroyViews];
|
||||
}
|
||||
}
|
||||
];
|
||||
__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];
|
||||
});
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user