Reputation: 1149
what is the Image Naming Convention for iPhone 5 like @2x for retina screens.
Upvotes: 5
Views: 4432
Reputation: 34
it is just the same. The @2x just means it's a retina image.
The only difference is the 568@2x (or whatever it is) for the splash screen but Xcode renames that file for you anyway.
Just keep using @2x.png
I must add, that if you look at the simulator the pictures maybe stretched! You could fix this by checking the box (if u use storyboard) "auto layout" I have some problems too maybe this is a bug which will be fixed I hope...
and on storyboard or .xib u can change the size of the controller like here:
Upvotes: 1
Reputation: 191
There is no specific naming convention for images on iPhone 5. The Default-568h@2x will be shown on launch of an iPhone 5 or iPod Touch 5G. This will also enable the non-letterbox mode of your app. For your other f.e. background images you have to design flexible if you want to cover both screen resolutions. When you building an iPhone 4s App assure that f.e. a background image can be strechted up to the iPhone 5 size.
Upvotes: 2
Reputation: 227
till now they have not released any official documentation for the iPhone5 Images.
You can do like this.
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && [[UIScreen mainScreen] bounds].size.height * [UIScreen mainScreen].scale >= 1136)
{
//Write the code here for iPhone5 Image.
}
else
{
//this is for unto 4th gen iPhone
}
Upvotes: 2
Reputation: 77631
It is just the same. The @2x just means it's a retina image.
The only difference is the 568@2x (or whatever it is) for the splash screen but Xcode renames that file for you anyway.
Just keep using @2x.png
Upvotes: 2