cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhilkh <...@git.apache.org>
Subject [GitHub] cordova-docs pull request: Document iOS specific callback for orie...
Date Thu, 02 Apr 2015 00:36:49 GMT
Github user nikhilkh commented on the pull request:

    https://github.com/apache/cordova-docs/pull/276#issuecomment-88674908
  
    config.xml does not support plist values to be set to landscape & portrait: https://github.com/apache/cordova-lib/blob/8de97feba2fa883298eb9c99be0c425c73960f1a/cordova-lib/src/cordova/metadata/ios_parser.js#L84

    
    '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;
        }
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message