diff --git a/README.md b/README.md index 9d28201..1c551ab 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,13 @@ You can use the following preferences in your `config.xml`: -- `FadeSplashScreenDuration` (float, defaults to `2`): Specifies the - number of seconds for the splash screen fade effect to execute. +- `FadeSplashScreenDuration` (float, defaults to `3000`): Specifies the + number of milliseconds for the splash screen fade effect to execute. + + + +Note also that this value used to be seconds, and not milliseconds, so values less than 30 will still be treated as seconds. ( Consider this a deprecated patch that will disapear in some future version. ) - - `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false` to hide the splash-screen spinner. diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m index 35c10fe..a1add30 100644 --- a/src/ios/CDVSplashScreen.m +++ b/src/ios/CDVSplashScreen.m @@ -22,7 +22,7 @@ #import #import "CDVViewController+SplashScreen.h" -#define kSplashScreenDurationDefault 0.25f +#define kSplashScreenDurationDefault 3000.0f @implementation CDVSplashScreen @@ -335,6 +335,12 @@ { fadeDuration = 0; } + else if(fadeDuration < 30) + { + // [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10 + // they mean 10 seconds, and not the meaningless 10ms + fadeDuration *= 1000; + } if (_visible) { @@ -351,7 +357,7 @@ { __weak __typeof(self) weakSelf = self; [UIView transitionWithView:self.viewController.view - duration:fadeDuration + duration:(fadeDuration / 1000) options:UIViewAnimationOptionTransitionNone animations:^(void) { [weakSelf hideViews];