5

Possible Duplicate:
iPhone 5 - what naming convention the new images have to follow?

I just downloaded the new xcode and I added the new splash screen for the new screen size. So now I have 3 files :

Default.png, Default@2x.png, Default-568h@2x.png

Until now if I wanted to make an UIImage with it, I could just simply do that:

UIImage *img = [UIImage imageNamed: @"Default"];

and Default.png or Default@2x.png was automatically chosen depending on the kind of iphone the app was executed. But now with the new screen size, of course it still works for normal screen/retina screen but not with 4" screens. How can I do to detect when the app is run on an iphone 5 and then use the *-568h image ?

Community
  • 1
  • 1
Alexis
  • 16,629
  • 17
  • 62
  • 107
  • I guess you'd just need to do a [UIImage imageNamed:@"Default.png"]. Just like 2x images were identified and used (if present), so would the iPhone 5 images be used. – lostInTransit Sep 14 '12 at 12:14
  • Xcode is not detecting the `-568h` or `-568h@2x` handles for any images besides the `Default.png`. Does anyone know why?? – adamdehaven Sep 14 '12 at 14:53
  • See http://stackoverflow.com/questions/12431445/iphone-5-what-naming-convention-the-new-images-have-to-follow – Bryan Sep 16 '12 at 07:50

1 Answers1

0

You just need to add Default-568h@2x.png image, sized 640 x 1136 px. In Xcode 4.5 you can also find a new field for 4" launch image in target summary.

paulheyer
  • 11
  • 2