html - Phonegap page has wrong rotation, shows as portrait in landscape mode -
i have (simple) web page packed in phonegap app. if start app shows page in portrait direction landscape page width. text starts left bottom left top. on right have gap page should end.
this see:
supported orientations landscape left , right in ...-info.plist
:
<key>uisupportedinterfaceorientations</key> <array> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array> <key>uisupportedinterfaceorientations~ipad</key> <array> <string>uiinterfaceorientationlandscaperight</string> <string>uiinterfaceorientationlandscapeleft</string> </array>
on ipad locked screen rotate. launch image shows correct in landscape.
the page designed fit landscape fixed sizes. viewport:
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
and page has correct width landscape turned around. can scroll , down. ipad status bar jumps top left after app start.
update
i change target device ipad , allowed orientation landscape left status bar on top needs be. page still turned... tried make simple page version should rotate did not work either.
update 2
in classes/mainviewcontroller.m
have:
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { // return yes supported orientations return (interfaceorientation == uiinterfaceorientationportrait); }
you can check root controller - shouldautorotatetointerfaceorientation, allow rotation orientation. hope helps.
for example return true
in classes/mainviewcontroller.m
:
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { // return yes supported orientations //return (interfaceorientation == uiinterfaceorientationportrait); return true; }
Comments
Post a Comment