问题
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
回答1:
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.
回答2:
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"]
来源:https://stackoverflow.com/questions/6136985/images-for-retina-display-iphone