美文网首页
获取系统的启动页 iOS

获取系统的启动页 iOS

作者: 大树_yrh | 来源:发表于2017-03-15 11:37 被阅读0次

//自动获取系统的启动页

-(UIImage *)getLuanchImage{

CGSize viewSize = [UIScreen mainScreen].bounds.size;

NSString *viewOrientation = @"Portrait";

NSString *launchImage = nil;

UIImage *imageLuanch;

NSDictionary *imagesDic = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"UILaunchImages"];

for (NSDictionary *dict in imagesDic) {

CGSize imageSize = CGSizeFromString(dict[@"UILaunchImageSize"]);

if (CGSizeEqualToSize(imageSize, viewSize)&& [viewOrientation isEqualToString:dict[@"UILaunchImageOrientation"]]) {

launchImage = dict[@"UILaunchImageName"];

}

}

return [UIImage imageNamed:launchImage];

}

//

imageViewBottom.contentMode = UIViewContentModeBottom;

相关文章

网友评论

      本文标题:获取系统的启动页 iOS

      本文链接:https://www.haomeiwen.com/subject/eqfsvttx.html