xcode7 获取 LaunchImage

@implementation UIImage (GetLaunchImage)

+ (UIImage *)getTheLaunchImage {    
    NSDictionary * dict = @{@"320x480" : @"700", @"320x568" : @"700-568h", @"375x667" : @"800-667h", @"414x736" : @"800-Portrait-736h"};
    NSString * key = [NSString stringWithFormat:@"%dx%d", (int)[UIScreen mainScreen].bounds.size.width, (int)[UIScreen mainScreen].bounds.size.height];
     // Brand Assets 和 Assets.xcassets 中作为 LaunchImage的 assets 名字保持一致
    NSString *imageName = [NSString stringWithFormat:@"Brand Assets-%@",dict[key]];    return [UIImage imageNamed:imageName];}
@end

你可能感兴趣的:(xcode7 获取 LaunchImage)