Cordova ipad app 100% height issue

时间:2015-11-12 11:38:55

标签: ios xcode cordova ipad

I just made an ios app through cordova, iphone app looks fine because I am using always portrait mode for iphones but for ipads I am using always landscape mode with locked rotation. The problem is when I ma build an app and run it on my ipad the landscape works fine the rotation is locked but the main issue is that I have set 100% height on body, and somehow its not working on iPad landscape. Looks like that 100% doesnt detect landscape mode and automatically was set 1024px for height because if I am set 768px height for body in inspect then the whole app looks fine as should.

Any ideas what can be the issue there ?

1 个答案:

答案 0 :(得分:1)

如果设置比例

,请勿设置宽度和高度

来自apple doc

  

您无需设置每个视口属性。如果只是一个子集   设置属性,然后iOS上的Safari推断其他值。   例如,如果将比例设置为1.0,则Safari假定宽度为   纵向设备宽度和横向设备高度。