Skip to content

Instantly share code, notes, and snippets.

@ast3150
ast3150 / get-launch-image.mm
Created November 6, 2018 15:57 — forked from luoph/get-launch-image.mm
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"]];
break;
}