cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject docs commit: CB-9086 - Document new 'all' orientation value for Orientation preference (iOS only)
Date Wed, 27 May 2015 23:28:19 GMT
Repository: cordova-docs
Updated Branches:
  refs/heads/master 50f1d881c -> 676f10716


CB-9086 - Document new 'all' orientation value for Orientation preference (iOS only)


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/676f1071
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/676f1071
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/676f1071

Branch: refs/heads/master
Commit: 676f107163d17c70cfa528ed13583dc8dcd8f5d2
Parents: 50f1d88
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed May 27 16:28:18 2015 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed May 27 16:28:18 2015 -0700

----------------------------------------------------------------------
 docs/en/edge/config_ref/index.md | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/676f1071/docs/en/edge/config_ref/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/config_ref/index.md b/docs/en/edge/config_ref/index.md
index 2e18232..ec92e51 100644
--- a/docs/en/edge/config_ref/index.md
+++ b/docs/en/edge/config_ref/index.md
@@ -188,17 +188,27 @@ all of them:
   preference entry from the platform's manifest/configuration file
   allowing the platform to fallback to its default behavior.
 
-'default' allows both portrait & landscape mode - only after implementing the callback.
I could perhaps re-word this as follows:
+  For iOS, to specify both portrait & landscape mode you would use the platform specific
value `all`:
 
-For iOS, orientation can be programmatically controlled by defining a javascript callback
on window:
+        <platform name="ios">
+            <preference name="Orientation" value="all" />
+        </platform>
 
+  For iOS, orientation can be programmatically controlled by defining a javascript callback
on `window`:
+    <pre>
     /** 
-    * @param {Number} degree - UIInterfaceOrientationPortrait: 0, UIInterfaceOrientationLandscapeRight:
90, UIInterfaceOrientationLandscapeLeft: -90, UIInterfaceOrientationPortraitUpsideDown: 180
-    * @returns {Boolean} Indicating if rotation should be allowed.
-    */
+     * @param {Number} degree 
+     *     UIInterfaceOrientationPortrait: 0, 
+     *     UIInterfaceOrientationLandscapeRight: 90, 
+     *     UIInterfaceOrientationLandscapeLeft: -90, 
+     *     UIInterfaceOrientationPortraitUpsideDown: 180 
+     *
+     * @returns {Boolean} Indicating if rotation should be allowed.
+     */
     function shouldRotateToOrientation(degrees) {
-         return true;
+      return true;
     }
+    </pre>
 
 ## The _feature_ Element
 


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


Mime
View raw message