Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Screen orientation ios

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!

like image 403
Paul Oostenrijk Avatar asked Jun 06 '13 19:06

Paul Oostenrijk


People also ask

Why is my phone screen not rotating?

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.

Why has my iPhone screen stopped rotating?

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.


1 Answers

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
  });
});
like image 142
yeyene Avatar answered Oct 01 '22 07:10

yeyene