问题
If I append the @2x suffix to my own images, will iOS 4 automatically replace my images with the Retina compatible ones, or does that only apply to Apple defined images? (Icons, for example.)
回答1:
Yes, of course. If you display a myimage.png
in your app, you may add a retina ready myimage@2x.png
, so it is shown on retina devices.
See this guide for further information.
回答2:
From the documentation:
The bundle- and image-loading routines automatically look for image files with the @2x string when the underlying device has a high-resolution screen.
So using for example [UIImage imageNamed:@"MyImage.png"]
will automatically look for MyImage@2x.png
when running on a device with retina display.
来源:https://stackoverflow.com/questions/3937204/retina-compatibility-question-can-i-add-2x-to-my-own-images-for-retina-compati