开发者

Images for retina display iphone

I have an working application which i have tested in my ipod touch. Everything works pretty fine.

My tabbar icons and splash screen images are in a separate folder in my Resources folder

Resources->images

Now, I know for iPhone4 i need to use 开发者_如何学编程2x images.

My question is for support for iPhone4 all that i need to do is add 2x images in my images folder. For example if my splashscreen image is Default.png, I should add my 2x image as Default@2x.png in my images folder and iphone will use it automatically.?

Is it the same for all tabbar images ?

Thanks in advance


Yes, all that you said is correct. Remember to also import the @2x images into your Xcode project (e.g. by dragging them from Finder to Xcode), so they'll be added to the bundle when you build your app.


For the apps I have worked on, I have only one image in this format:

myImage@2x.png

When I reference this image, I make the following call and it always works, whether on a 3GS/iPhone 4 or iPad.

[UIImage imageNamed:@"myImage.png"]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜