Ios screen orientation

I am working on a telephony and jqm application for ios. I want to lock the screen orientation to the landscape on only one page. The remaining pages should be locked in the portrait. I saw a plugin that can do this, but it is only available for Android.

My question Is there any way to do this on ios?

Thanks in advance!

+6
source share
2 answers

Check out the JQM API here ... (not tested yet)

http://api.jquerymobile.com/orientationchange/

Time Change Orientation

The time of the changechange event regarding the change in height and width of the client varies between browsers, although the current implementation will give you the correct value for the event.orientation obtained from window.orientation. This means that if your anchors depend on the height and width, you can turn off the orientation. Modify in general with $ .mobile.orientationChangeEnabled = false so that the resize backup code triggers your bindings.

http://jquerymobile.com/demos/1.2.0/docs/api/globalconfig.html

You can override the default settings by extending the $ .mobile object using the jQuery $ .extend method.

$(document).bind("mobileinit", function(){ $.extend( $.mobile , { foo: bar }); }); 
+1
source

No, if you did not run the iOS plugin for this function or if you did not find another version of iOS. PhoneGap only offers to block the screen orientation of the entire UIWebView, so the settings for certain parts of your application are up to you / devs.

0
source

Source: https://habr.com/ru/post/946718/


All Articles