当前设备的启动映像的IOS UIImage [英] IOS UIImage of launch image for current device
本文介绍了当前设备的启动映像的IOS UIImage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法获得启动图像作为UIImage当前设备?
或UIImageView与图像
is there way to get launch image as UIImage for current device? or UIImageView with an image
推荐答案
您只需要获得 Default.png
,它将根据需要应用任何
@ 2x
。
- (UIImage *)splashImage {
return [UIImage imageNamed:@"Default.png"];
}
如果你想获得iPhone 5特定的一个,你需要做一个高度检查:
If you care about getting the iPhone 5 specific one you need to do a height check:
- (UIImage *)splashImage {
if ([[UIScreen mainScreen] bounds].size.height == 568.0){
return [UIImage imageNamed:@"Default-568h.png"];
} else {
return [UIImage imageNamed:name];
}
}
这篇关于当前设备的启动映像的IOS UIImage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文