mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-05-05 01:32:59 +08:00
Merge pull request #5 from gbenvenuti/master
Readme update, added note on iOS6 raised in Issue #1
This commit is contained in:
commit
839eb274c1
23
README.md
23
README.md
@ -1,22 +1,29 @@
|
|||||||
cordova-yoik-screenorientation
|
#cordova-yoik-screenorientation
|
||||||
==============================
|
|
||||||
|
|
||||||
Cordova plugin to set/lock the screen orientation in a common way for both iOS and Android.
|
Cordova plugin to set/lock the screen orientation in a common way for both iOS and Android.
|
||||||
|
|
||||||
Install
|
##Install
|
||||||
=
|
|
||||||
cordova plugin add https://github.com/yoik/cordova-yoik-screenorientation
|
cordova plugin add https://github.com/yoik/cordova-yoik-screenorientation
|
||||||
|
|
||||||
Android
|
###Android
|
||||||
====
|
|
||||||
The android version is implemented via the standard _activity.setRequestedOrientation_ as used in other screen orientation plugins
|
The android version is implemented via the standard _activity.setRequestedOrientation_ as used in other screen orientation plugins
|
||||||
|
|
||||||
iOS
|
###iOS
|
||||||
====
|
|
||||||
The iOS version is a combination of the cordova JS callback _window.shouldRotateToOrientation_ and the workaround to recheck the orientation as implemented in https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation.
|
The iOS version is a combination of the cordova JS callback _window.shouldRotateToOrientation_ and the workaround to recheck the orientation as implemented in https://github.com/Adlotto/cordova-plugin-recheck-screen-orientation.
|
||||||
|
|
||||||
If you have a custom impelemntation of the _window.shouldRotateToOrientation_ it will have to be removed for the plugin to function as expected.
|
If you have a custom impelemntation of the _window.shouldRotateToOrientation_ it will have to be removed for the plugin to function as expected.
|
||||||
|
|
||||||
|
####iOS6
|
||||||
|
|
||||||
|
There has been a few cases where the rotation does not change the width of the viewport
|
||||||
|
|
||||||
|
Issue [#1](https://github.com/yoik/cordova-yoik-screenorientation/issues/1) @dokterbob
|
||||||
|
|
||||||
|
>It seems to be related to having width=device-width, height=device-height in the meta viewport (which is part of the boilerplate phonegap/cordova app). It can be solved by updating the viewport with width=device-height, height=device-width or simply removing width and height altogether.
|
||||||
|
|
||||||
Constants
|
Constants
|
||||||
====
|
====
|
||||||
Orientation: {
|
Orientation: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user