I am confused about how to use simulators to create applications that the new high resolution Need to support iphone 4
I leave except for choosing iPhone4 simulator to run that app, [[UIScreen main screen] bound] will give me 960x640 but instead it is Also giving me the old resolution (480x320)?
Although the iphone4 simulator appears as a huge phone on my screen, it seems that it is still only 480x320 pixels, for example, when I would like to display something on line 700, So will it just come on screen?
Thanks for any input on this.
There is a new scale method in USScreen. Size the boundaries by scale to get the pixels. You can think of the unceded values as points, or virtual pixels.
Note that at least 3.2 has been the method on the scale of UIScreen, but the answer has been only since 4.0. Therefore, the Reactive will trick you when I want to know about UIScreen, I still check UIImage for the scale.
UIScreen * Main screen = [UIScreen main screen]; CGFloat scale = [main screen scale]; CGRTT binding = [main screen border]; CGRT pixel = border; If (scale> gt; 0) {pixels.origin.x * = scale; Pixels.origin.y * = scale; Pixels.size.width * = scale; Pixels.size.height * = scale; }
Comments
Post a Comment