cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] cordova-plugin-splashscreen git commit: CB-9750 FadeSplashDuration is now in msecs
Date Tue, 06 Oct 2015 00:47:47 GMT
Repository: cordova-plugin-splashscreen
Updated Branches:
  refs/heads/master b83392df2 -> 7eec7c8b4


CB-9750 FadeSplashDuration is now in msecs


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/3a796636
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/3a796636
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/3a796636

Branch: refs/heads/master
Commit: 3a796636803f26693d3ce6f18b424824f5bf1ce9
Parents: b83392d
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Mon Oct 5 17:45:43 2015 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Mon Oct 5 17:46:12 2015 -0700

----------------------------------------------------------------------
 README.md                 |  9 ++++++---
 src/ios/CDVSplashScreen.m | 10 ++++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/3a796636/README.md
----------------------------------------------------------------------
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`:
 
         <preference name="FadeSplashScreen" value="false"/>
 
-- `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.
+
+        <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`
   to hide the splash-screen spinner.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/3a796636/src/ios/CDVSplashScreen.m
----------------------------------------------------------------------
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 <Cordova/CDVScreenOrientationDelegate.h>
 #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];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message