aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-27 15:07:18 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-27 15:07:18 +0100
commit6633ee17aa00725bf3cf785e4d055b8f5019f30c (patch)
treecfcad146475c2c448a4a51e9fbe31a5ab94138b0
parent597679f537df8a3c26e4c8b561b8179dc7a0829a (diff)
Stop iOS 7 splashscreen bounce
Saves an upgrade to Phonegap 3.0
-rwxr-xr-xiPhone/CordovaLib/Classes/CDVSplashScreen.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/iPhone/CordovaLib/Classes/CDVSplashScreen.m b/iPhone/CordovaLib/Classes/CDVSplashScreen.m
index fdb79fa..8ce1191 100755
--- a/iPhone/CordovaLib/Classes/CDVSplashScreen.m
+++ b/iPhone/CordovaLib/Classes/CDVSplashScreen.m
@@ -170,7 +170,10 @@
// There's a special case when the image is the size of the screen.
if (CGSizeEqualToSize(screenSize, imgBounds.size)) {
CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
- imgBounds.origin.y -= statusFrame.size.height;
+ // fix for splash screen bounce from http://stackoverflow.com/questions/18927141/ios7-startup-screen-splash-screen-leave-a-space-on-the-bottom
+ if (!(IsAtLeastiOSVersion(@"7.0"))) {
+ imgBounds.origin.y -= statusFrame.size.height;
+ }
} else {
CGRect viewBounds = self.viewController.view.bounds;
CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;