Skip to content

Instantly share code, notes, and snippets.

@luoph
Created May 26, 2015 02:04
Show Gist options
  • Save luoph/85a5522c95e283d8ff24 to your computer and use it in GitHub Desktop.
Save luoph/85a5522c95e283d8ff24 to your computer and use it in GitHub Desktop.
iOS get App Launch Image
+ (UIImage*)getLaunchImage
{
UIImage* launchImage = nil;
NSArray* imagesDict = [[MainBundle infoDictionary] valueForKey:@"UILaunchImages"];
for (NSDictionary* dict in imagesDict) {
CGSize launchImageSize = CGSizeFromString(dict[@"UILaunchImageSize"]);
if (CGSizeEqualToSize([UIScreen mainScreen].bounds.size, launchImageSize)) {
launchImage = [UIImage imageNamed:dict[@"UILaunchImageName"]];
}
}
return launchImage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment