I am working on a application for ios with phonegap and jqm. I want to lock the screen orientation to landscape on just one page. The other pages have to be locked on portrait. I have seen a plugin that can do this but its only available for android.
My question? Is there a way to also do this on ios?
Thanks in advance!
Swipe down from the top of the screen to open the Quick settings panel. Look for the screen orientation icon. Depending on your settings, you may need to look for the Portrait, Landscape, or Auto Rotate icon.
Turn off iPhone Screen Rotation Lock If your screen won't rotate, it could be because you've got Rotation Lock turned on. To check whether the screen rotation lock is turned on, look in the top right corner of the screen next to the battery indicator for an icon that looks like an arrow curving around a lock.
Check some JQM API here...( haven't test yet )
http://api.jquerymobile.com/orientationchange/
Orientationchange Timing
The timing of the orientationchange event with relation to the change of the client height and width is different between browsers, though the current implementation will give you the correct value for event.orientation derived from window.orientation. This means that if your bindings are dependent on the height and width values you may want to disable orientationChange altogether with $.mobile.orientationChangeEnabled = false to let the fallback resize code trigger your bindings.
http://jquerymobile.com/demos/1.2.0/docs/api/globalconfig.html
You can override default settings by extending the $.mobile object using jQuery's $.extend method.
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
foo: bar
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With