Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2940617F95 for ; Thu, 2 Apr 2015 00:36:50 +0000 (UTC) Received: (qmail 86663 invoked by uid 500); 2 Apr 2015 00:36:49 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 86621 invoked by uid 500); 2 Apr 2015 00:36:49 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 86610 invoked by uid 99); 2 Apr 2015 00:36:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 00:36:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6491CE109B; Thu, 2 Apr 2015 00:36:49 +0000 (UTC) From: nikhilkh To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-docs pull request: Document iOS specific callback for orie... Content-Type: text/plain Message-Id: <20150402003649.6491CE109B@git1-us-west.apache.org> Date: Thu, 2 Apr 2015 00:36:49 +0000 (UTC) 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