New image name for iPhone 5

No special suffix for iPhone 5 (4” display), just the specific Default-568h@2x.png file.

Here’s a macro to handle it:

// iPhone 5 support
#define ASSET_BY_SCREEN_HEIGHT(regular, longScreen) (([[UIScreen mainScreen] bounds].size.height <= 480.0) ? regular : longScreen)

Usage: (assets names – image.png, image@2x.png, image-568h@2x.png)

myImage = [UIImage imageNamed:ASSET_BY_SCREEN_HEIGHT(@"image",@"image-568h")];

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)