You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/03/21 04:26:39 UTC

ios commit: CB-2691: Splashscreen should block user interaction

Updated Branches:
  refs/heads/master e9e67d0b9 -> cd4eae05b


CB-2691: Splashscreen should block user interaction

- this disables user interaction while splashscreen is shown


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cd4eae05
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cd4eae05
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cd4eae05

Branch: refs/heads/master
Commit: cd4eae05b85d22ecf236b07943f463ffc36efe52
Parents: e9e67d0
Author: James Jong <wj...@gmail.com>
Authored: Mon Mar 18 15:31:04 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 23:26:23 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVSplashScreen.m |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cd4eae05/CordovaLib/Classes/CDVSplashScreen.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.m b/CordovaLib/Classes/CDVSplashScreen.m
index b06c486..efe3eaa 100644
--- a/CordovaLib/Classes/CDVSplashScreen.m
+++ b/CordovaLib/Classes/CDVSplashScreen.m
@@ -77,6 +77,7 @@
     }
 
     UIView* parentView = self.viewController.view;
+    parentView.userInteractionEnabled = NO;  // disable user interaction while splashscreen is shown
     _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle];
     _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2);
     _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin
@@ -104,6 +105,7 @@
     _activityView = nil;
     _curImageName = nil;
 
+    self.viewController.view.userInteractionEnabled = YES;  // re-enable user interaction upon completion
     [self.viewController.view removeObserver:self forKeyPath:@"frame"];
     [self.viewController.view removeObserver:self forKeyPath:@"bounds"];
 }