CB-9750 FadeSplashDuration is now in msecs
This commit is contained in:
parent
b83392df21
commit
3a79663680
@ -94,10 +94,13 @@ You can use the following preferences in your `config.xml`:
|
|||||||
|
|
||||||
<preference name="FadeSplashScreen" value="false"/>
|
<preference name="FadeSplashScreen" value="false"/>
|
||||||
|
|
||||||
- `FadeSplashScreenDuration` (float, defaults to `2`): Specifies the
|
- `FadeSplashScreenDuration` (float, defaults to `3000`): Specifies the
|
||||||
number of seconds for the splash screen fade effect to execute.
|
number of milliseconds for the splash screen fade effect to execute.
|
||||||
|
|
||||||
|
<preference name="FadeSplashScreenDuration" value="3000"/>
|
||||||
|
|
||||||
|
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. )
|
||||||
|
|
||||||
<preference name="FadeSplashScreenDuration" value="4"/>
|
|
||||||
|
|
||||||
- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false`
|
- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false`
|
||||||
to hide the splash-screen spinner.
|
to hide the splash-screen spinner.
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#import <Cordova/CDVScreenOrientationDelegate.h>
|
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||||
#import "CDVViewController+SplashScreen.h"
|
#import "CDVViewController+SplashScreen.h"
|
||||||
|
|
||||||
#define kSplashScreenDurationDefault 0.25f
|
#define kSplashScreenDurationDefault 3000.0f
|
||||||
|
|
||||||
|
|
||||||
@implementation CDVSplashScreen
|
@implementation CDVSplashScreen
|
||||||
@ -335,6 +335,12 @@
|
|||||||
{
|
{
|
||||||
fadeDuration = 0;
|
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)
|
if (_visible)
|
||||||
{
|
{
|
||||||
@ -351,7 +357,7 @@
|
|||||||
{
|
{
|
||||||
__weak __typeof(self) weakSelf = self;
|
__weak __typeof(self) weakSelf = self;
|
||||||
[UIView transitionWithView:self.viewController.view
|
[UIView transitionWithView:self.viewController.view
|
||||||
duration:fadeDuration
|
duration:(fadeDuration / 1000)
|
||||||
options:UIViewAnimationOptionTransitionNone
|
options:UIViewAnimationOptionTransitionNone
|
||||||
animations:^(void) {
|
animations:^(void) {
|
||||||
[weakSelf hideViews];
|
[weakSelf hideViews];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user