You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/04/22 21:09:48 UTC

[2/9] docs commit: Document iOS specific callback for orientaion

Document iOS specific callback for orientaion


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

Branch: refs/heads/master
Commit: faa9a493d63bc5d903aec64e1a2c15922e41f72c
Parents: 45f8ff5
Author: Nikhil Khandelwal <ni...@microsoft.com>
Authored: Wed Apr 1 13:08:13 2015 -0700
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Wed Apr 1 17:58:38 2015 -0700

----------------------------------------------------------------------
 docs/en/edge/config_ref/index.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/faa9a493/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 fdda5b8..93f15f4 100644
--- a/docs/en/edge/config_ref/index.md
+++ b/docs/en/edge/config_ref/index.md
@@ -188,6 +188,18 @@ 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, orientation can be programmatically controlled by defining a javascript callback on window:
+
+    /** 
+    * @param {Number} degree - UIInterfaceOrientationPortrait: 0, UIInterfaceOrientationLandscapeRight: 90, UIInterfaceOrientationLandscapeLeft: -90, UIInterfaceOrientationPortraitUpsideDown: 180
+    * @returns {Boolean} Indicating if rotation should be allowed.
+    */
+    function shouldRotateToOrientation(degrees) {
+         return true;
+    }
+
 ## The _feature_ Element
 
 If you use the CLI to build applications, you use the `plugin` command


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