I’m getting a bit confused on how to use the simulator to build applications that need to support the new higher resolution of the iphone 4.
I would except when selecting the iphone4 simulator to run the app on that [[UIScreen mainScreen] bounds] would give me 960×640 back, but instead it still giving me the old resolution (480×320) ?
Although the iphone4 simulator appears as a giant phone on my screen, it appears that it still consists of only 480×320 pixels. For instance when I would want to display something on line 700, it’ll just fall ofscreen ?
Thanks for any input on this.
UIScreen has a new
scalemethod. Multiply the bounds.size by the scale to get the pixels. You can think of unscaled values as being points, or virtual pixels.Note that UIScreen has had a scale method since at least 3.2 but it has only been documented since 4.0 so respondsToSelector will trick you. I check UIImage for scale even when I want to know about UIScreen.