Dealing with iPad Mini screen size

2019-01-06 10:40发布

The new iPad Mini has a 7.9 inch screen size. Does it have a retina display? Will it automatically scale existing xibs and storyboards or do we have to create two versions of each?

Do we deal with it similar to the way we deal with the iPhone 5?

How would I create a definition or a condition to see if the device is running iPad Mini?

标签: ios ipad-mini
9条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-01-06 11:07

Apps will work fine. But if you have some very small UI elements. you might want to revisit them due to the reduction in screen size.

查看更多
放荡不羁爱自由
3楼-- · 2019-01-06 11:07

If the iPad Mini and the non-retina iPad's are going to be the same screen size regardless, couldn't you use something like what is used to determine whether the device screen is an iPhone 5 or iPhone 4:

#define IS_WIDESCREEN5 ( [ [ UIScreen mainScreen ] bounds ].size.height == 568 )
#define IS_WIDESCREEN4 ( [ [ UIScreen mainScreen ] bounds ].size.height == 480 )

So for iPad Mini, and non-retina iPad's, do:

#define IS_PAD ( [ [ UIScreen mainScreen ] bounds ].size.height == 512 )

and for retina iPad's do:

#define IS_RETINA_PAD ( [ [ UIScreen mainScreen ] bounds ].size.height == 1024 )

This should differentiate the two types of screens and bypass the need to pinpoint the exact model for scale purposes. The alternate method would be to use auto-layout, however I have a better feeling of control without it.

I hope this helps with the second part of your question. Good luck :)

查看更多
Evening l夕情丶
4楼-- · 2019-01-06 11:07

You dont have to do anything different. It should automatically work as mentioned by apple. The resolution is still the same as iPad.

查看更多
登录 后发表回答