0

I am updating my universal app and naming my image files as follows:

buttonHelp.png
buttonHelp@2x.png
buttonHelp~iPad.png
buttonHelp@2x~iPad.png

This works fine on the simulator, but on my device (classic iPad running iOS 5.1) only buttonHelp.png shows up! (I have also tried "ipad" instead of "iPad").

Any suggestions?

ragnarius
  • 5,642
  • 10
  • 47
  • 68
  • 3
    If simulator works well and device does not, then it usually is a matter of case-sensitivity - that is, your file actually uses different letter cases than your given image names. You may also try to do a clean build as Xcode tends to cache image files. – Till Apr 29 '12 at 14:10

2 Answers2

4

The filenames are case sensitive, and must use lowercase ~ipad and @2x~ipad

buttonHelp.png
buttonHelp@2x.png
buttonHelp~ipad.png
buttonHelp@2x~ipad.png

Double check that XCode is actually transferring the files by removing the installed version from your device, doing a clean build, and reinstalling.

Also check each of the files are in listed in the 'Copy Bundle Resources' section of your 'Build Phases' in your project settings.

Reference:

Standard: <ImageName><device_modifier>.<filename_extension>

High resolution: <ImageName>@2x<device_modifier>.<filename_extension>

http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/SupportingHiResScreens/SupportingHiResScreens.html

Community
  • 1
  • 1
Dave Wood
  • 13,143
  • 2
  • 59
  • 67
1

It could be that buttonHelp@2x~iPad.png should be buttonHelp~iPad@2x.png.

The compiler does the trick where it sources all images with the @2x at the end of the file name for the retina display. If that image isn't found, though, it should default to the non-retina version, though.

Have you tried getting rid of the tilde in the filename?

SushiGrass Jacob
  • 19,425
  • 1
  • 25
  • 39