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

后端 未结 30 3917
醉话见心
醉话见心 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:15

    Rather than using a set of conditionals you can resize your view automatically using the screen size.

    int h = [[UIScreen mainScreen] bounds].size.height;
    int w = [[UIScreen mainScreen] bounds].size.width;
    self.imageView.frame = CGRectMake(20, 80, (h-200), (w-100));
    

    In my case I want a view that fills the space between some input fields at the top and some buttons at the bottom, so fixed top left corner and variable bottom right based on screen size. My app fills the image view with the photo taken by the camera so I want all the space I can get.

提交回复
热议问题