I am using Xcode 5\'s Asset Catalog, and I would like to use my LaunchImage as the background image of my home view (a pretty common practice to make the transi
My app currently only supports iOS 7 and later.
This is how I reference the launch image from the asset catalog:
NSDictionary *dict = @{@"320x480" : @"LaunchImage-700",
@"320x568" : @"LaunchImage-700-568h",
@"375x667" : @"LaunchImage-800-667h",
@"414x736" : @"LaunchImage-800-Portrait-736h"};
NSString *key = [NSString stringWithFormat:@"%dx%d",
(int)[UIScreen mainScreen].bounds.size.width,
(int)[UIScreen mainScreen].bounds.size.height];
UIImage *launchImage = [UIImage imageNamed:dict[key]];
You can add more key value pairs if you want to support older iOS versions.