From d2e62a551c950041cb4c9683624a04d931f4bee3 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Mon, 13 Oct 2014 16:11:42 -0700 Subject: [PATCH] CB-7204 - Race condition when hiding and showing spinner (closes #21) --- src/ios/CDVSplashScreen.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 4b4d466..f65a501 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -292,13 +292,15 @@ duration:fadeDuration options:UIViewAnimationOptionTransitionNone animations:^(void) { - [_imageView setAlpha:0]; - [_activityView setAlpha:0]; - } - + [_imageView setAlpha:0]; + [_activityView setAlpha:0]; + } completion:^(BOOL finished) { - [self destroyViews]; - }]; + if (finished) { + [self destroyViews]; + } + } + ]; } }