- (UIImage *)getLaunchImage { UIImage *image = nil; CGSize viewSize = [[UIScreen mainScreen] bounds].size; NSString *viewOrientation = @"Portrait"; //横屏请设置成 @"Landscape" NSString *launchImage = nil; //1.通过launchimage获取 NSArray* imagesDict = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"UILaunchImages"]; for (NSDictionary* dict in imagesDict) { CGSize imageSize = CGSizeFromString(dict[@"UILaunchImageSize"]); if (CGSizeEqualToSize(imageSize, viewSize) && [viewOrientation isEqualToString:dict[@"UILaunchImageOrientation"]]) { launchImage = dict[@"UILaunchImageName"]; image = [UIImage imageNamed:launchImage]; } } return image; }