开发者

iPhone 4 screen resolution (code-wise)?

I had an epiphany just now. In some places in my very first iPhone app I have hardcoded values referring to the screen width and/or height (320, 460).

now I realize that i never noticed this because in the iPhone 4 simulator i dont notice any drawing issues.

So does this mean the iPhone 4 internally converts 320 to be whatever the width for its screen resolution? i doubt it. But then again, why would i be seeing everything 开发者_如何学JAVAappearing to be fine when i run?

Example: If I make a ball draw at position (320, 100) I can clearly see that it is drawing at the far right edge of the screen.

What is going on here?


No it does not adapt the screen it's standard 320 for the iphone. It actually adapts the simulator to the mac screen makes it bigger. And about the ball 320 is from left to right 0---320, and the 460 is from up to down 0----460. sow putting the ball at 320,100 should place it in the fa right.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜