When the iPhone 5 comes out, we will adapt to screens with different resolutions like android.
The new version of the company's products must be adapted to the iPhone 5. After some effort, it is done. I will share with you the screen resolution of iPhone 5: 1136x640, that is, when the height is changed to, the name of the photo is default-568h@2x.png. When we create a project, xcode creates a pure black image by default. The latest version of xcode supports debugging for iphone 5: select the simulator ----> device ----> iphone (Retina 4-inch). You can switch to the iphone 5 simulator in a moment. To adapt to iPhone 5, you need to set the autosizing of the view to the following status: corresponding code: [cpp] autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin ;. autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin; this means that when the control is scaled, it corresponds to the left and top of the parent view. You can set the autorizingMask value for the Child control as needed. We can also use the code to manually change the size or location of the control under the iPhone 5: first determine whether the device is iphone5: [cpp] # define DEVICE_IS_IPHONE5 ([UIScreen mainScreen] bounds]. size. height = 568) # define DEVICE_IS_IPHONE5 ([UIScreen mainScreen] bounds]. size. height = 568) Then we can change frame: [cpp] if (DEVICE_IS_IPHONE5) {[botton setFrame: CGRectMake (0,450,320,440)];} if (DEVICE_IS_IPHONE5) during view initialization) {[botton setFrame: CGRectMake (0,450,320,440)];}