CB-8836 - Crashes after animating splashscreen
This commit is contained in:
parent
35272415d3
commit
559b300d29
@ -289,16 +289,25 @@
|
|||||||
} else if (fadeDuration == 0) {
|
} else if (fadeDuration == 0) {
|
||||||
[self destroyViews];
|
[self destroyViews];
|
||||||
} else {
|
} else {
|
||||||
|
__weak __typeof(self) weakSelf = self;
|
||||||
|
|
||||||
[UIView transitionWithView:self.viewController.view
|
[UIView transitionWithView:self.viewController.view
|
||||||
duration:fadeDuration
|
duration:fadeDuration
|
||||||
options:UIViewAnimationOptionTransitionNone
|
options:UIViewAnimationOptionTransitionNone
|
||||||
animations:^(void) {
|
animations:^(void) {
|
||||||
[_imageView setAlpha:0];
|
__typeof(self) strongSelf = weakSelf;
|
||||||
[_activityView setAlpha:0];
|
if (strongSelf != nil) {
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[strongSelf->_activityView setAlpha:0];
|
||||||
|
[strongSelf->_imageView setAlpha:0];
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
completion:^(BOOL finished) {
|
completion:^(BOOL finished) {
|
||||||
if (finished) {
|
if (finished) {
|
||||||
[self destroyViews];
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[weakSelf destroyViews];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user