Created
May 26, 2015 02:04
-
-
Save luoph/85a5522c95e283d8ff24 to your computer and use it in GitHub Desktop.
iOS get App Launch Image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (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