cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: CB-5189 - ios - Backport for v2.9.1 of CB-4806, CB-4355 (Splashscreen)
Date Thu, 24 Oct 2013 00:25:31 GMT
Updated Branches:
  refs/heads/2.9.x b7230b43b -> 5201cad46


CB-5189 - ios - Backport for v2.9.1 of CB-4806, CB-4355 (Splashscreen)


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

Branch: refs/heads/2.9.x
Commit: 5201cad466a3995da4eb7f4894faa177ad3466c8
Parents: b7230b4
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Oct 23 17:25:24 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Oct 23 17:25:24 2013 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVSplashScreen.h |  2 +-
 CordovaLib/Classes/CDVSplashScreen.m | 14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5201cad4/CordovaLib/Classes/CDVSplashScreen.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.h b/CordovaLib/Classes/CDVSplashScreen.h
index 704ab43..932ad06 100644
--- a/CordovaLib/Classes/CDVSplashScreen.h
+++ b/CordovaLib/Classes/CDVSplashScreen.h
@@ -18,7 +18,7 @@
  */
 
 #import <Foundation/Foundation.h>
-#import "CDVPlugin.h"
+#import <Cordova/CDVPlugin.h>
 
 @interface CDVSplashScreen : CDVPlugin {
     UIActivityIndicatorView* _activityView;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5201cad4/CordovaLib/Classes/CDVSplashScreen.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.m b/CordovaLib/Classes/CDVSplashScreen.m
index fdb79fa..a1c11c3 100644
--- a/CordovaLib/Classes/CDVSplashScreen.m
+++ b/CordovaLib/Classes/CDVSplashScreen.m
@@ -42,7 +42,7 @@
 
 - (void)pageDidLoad
 {
-    id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:@"AutoHideSplashScreen"];
+    id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen"
lowercaseString]];
 
     // if value is missing, default to yes
     if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) {
@@ -65,7 +65,7 @@
      *     gray       = UIActivityIndicatorViewStyleGray
      *
      */
-    NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:@"TopActivityIndicator"];
+    NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator"
lowercaseString]];
     UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
 
     if ([topActivityIndicator isEqualToString:@"whiteLarge"]) {
@@ -88,7 +88,7 @@
     _imageView = [[UIImageView alloc] init];
     [parentView addSubview:_imageView];
 
-    id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:@"ShowSplashScreenSpinner"];
+    id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner"
lowercaseString]];
     // backwards compatibility - if key is missing, default to true
     if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue])
{
         [parentView addSubview:_activityView];
@@ -170,7 +170,9 @@
     // 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;
+        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;
@@ -196,8 +198,8 @@
     }
     _visible = visible;
 
-    id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:@"FadeSplashScreen"];
-    id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:@"FadeSplashScreenDuration"];
+    id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen"
lowercaseString]];
+    id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration"
lowercaseString]];
 
     float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault :
[fadeSplashScreenDuration floatValue];
 


Mime
View raw message