开发者

how to adjust screens which supports for all iphone devices

i did an application which supports all the iphone devices means iphone 2.0 to up开发者_如何学Pythonto latest version.

i did my application in iphone sdk 4.0.When i build and run the same application in iphone sdk 3.0 the screens will appear differently like this. this is the screenshot of iphone sdk 4.0 simulator

this is the screenshot of iphone sdk 3.0 simulator

All these 12 are buttons with images

how can i adjust this.

can any one please help me.

Thank u in advance.


It is hard to say just from a screen shot, but I think you only have iPhone4 graphics, but you have to have both types of graphics in your app.

Let's say that you have pink.png for one, then for the iPhone4, you need to have the same graphic at twice the size called pink@2x.png. The runtime picks up the @2x automatically and uses those graphics for the retina display.

Edit: If you look at the docs, they have a fair amount on this. http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html

It all boils down to this: You have to scale your images yourself to work on both types of display. The runtime will pick up on the correct graphics if you name them correctly. pink.png being 60X60 pixels will show up correctly on the 3GS pink@2x.png should be identical to pink.png except being 120X120 and will show up correctly on the iPhone4 and the current iPod touch.

It is about a close to resolution independence as we get right now.

Edit2 One last thought: The real kicker here is that even though you have 2 different graphics with 2 similar, but somewhat different names, you only have to reference the original pink.png. The iPhone4 will automatically look for the pink@2x.png image even though you call for the pink.png image.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜