How to differ between ipad mini and ipad air?

前端 未结 3 914
长情又很酷
长情又很酷 2021-01-16 11:29

When I run on simulator ipad mini (which I am using ipad 2 profile) and ipad air it shows the same resolution 1024x768

for UI Kit it might adjust automatically but I

3条回答
  •  天涯浪人
    2021-01-16 12:31

    If your question is about retina vs. non-retina then UIScreen has a bunch of methods for querying the screen parameters (e.g [UIScreen scale]).

    But if you want to handle the dpi difference (and the related button minimal size) then please have a look at Determine device (iPhone, iPod Touch) with iPhone SDK. Warning though: the list of devices is open, so whenever a new device appears you will have to update your app.

提交回复
热议问题