From 33f353d2e9684e189f8b7d59c066253f2fe73f48 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Wed, 24 Jul 2013 15:48:59 -0700 Subject: [PATCH] [CB-4355] Splashscreen plugin handles options incorrectly (the settings key is specified with upper case chars) --- src/ios/CDVSplashScreen.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index fdb79fa..ba8d108 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/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]; @@ -196,8 +196,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];