How to develop or migrate apps for iPhone 5 screen resolution?

后端 未结 30 3165
醉话见心
醉话见心 2020-11-21 05:48

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels).

What is required to develop new or transition already existing applications

30条回答
  •  被撕碎了的回忆
    2020-11-21 06:04

    Checking bounds with 568 will fail in landscape mode. iPhone 5 launches only in portrait mode but if you want to support rotations then the iPhone 5 "check" will need to handle this scenario as well.

    Here's a macro which handles orientation state:

    #define IS_IPHONE_5 (CGSizeEqualToSize([[UIScreen mainScreen] preferredMode].size, CGSizeMake(640, 1136)))
    

    The use of the 'preferredMode' call is from another posting I read a few hours ago so I did not come up with this idea.

提交回复
热议问题