Skip to content

Instantly share code, notes, and snippets.

@WenchaoD
Last active September 23, 2015 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WenchaoD/b4df6ebd5f230f78ca87 to your computer and use it in GitHub Desktop.
Save WenchaoD/b4df6ebd5f230f78ca87 to your computer and use it in GitHub Desktop.
iOS get lauchImage
NSDictionary *launchImageNames = @{
@"320x480" : @"LaunchImage-700@2x.png",
@"320x568" : @"LaunchImage-700-568h@2x.png",
@"375x667" : @"LaunchImage-800-667h@2x.png",
@"414x736" : @"LaunchImage-800-Portrait-736h@3x.png"
};
NSString *aspect = [NSString stringWithFormat:@"%@x%@",@([UIScreen mainScreen].bounds.size.width),@([UIScreen mainScreen].bounds.size.height)];
UIImage *launchImage = [UIImage imageNamed:launchImageNames[aspect]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment