cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: How does orientation work, and what is shouldRotateToOrientation?
Date Thu, 07 Jan 2016 21:22:28 GMT
What Julio said. The original intent for this was for a way for
Cordova users to control orientation dynamically (say a view you have
is supposed to work in landscape only) --  the orientation methods
currently are all static (Info.plist based).

On Wed, Jan 6, 2016 at 11:01 PM, julio cesar sanchez
<jcesarmobile@gmail.com> wrote:
> Can you share the whole bug report?
>
> On iOS the rotation doesn't work unless you configure it on the config.xml
>
>     <platform name="ios">
>         <preference name="Orientation" value="all" />
>     </platform>
>
> The shouldRotateToOrientation javascript function is deprecated on cordova
> ios 4.x.x
>
> https://issues.apache.org/jira/browse/CB-5690
> https://issues.apache.org/jira/browse/CB-8893
>
>
>
>
> 2016-01-07 6:38 GMT+01:00 Dmitry Blotsky <dblotsky@microsoft.com>:
>
>> Hey folks,
>>
>> I’ve had a bug forwarded my way where a Cordova app wouldn’t switch
>> orientation on iOS unless the following code was present:
>>
>> function onDeviceReady() {
>>     ...
>>     window.shouldRotateToOrientation = function (degrees) {
>>         return true;
>>     }
>>     ...
>> };
>>
>> Could someone please explain why it is needed? Is this in one of our
>> plugins? And perhaps also: what else/instead is needed to have a Cordova
>> app properly support flipping of screen orientation?
>>
>> Kindly,
>> Dmitry

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


Mime
View raw message