let viewSize = UIScreen.main.bounds.size
let viewOr = "Portrait"//垂直
var launchImageName = ""
let tmpLaunchImages = Bundle.main.infoDictionary!["UILaunchImages"] as? [Any]
for dict in tmpLaunchImages! {
if let someDict = dict as? [String: Any] {
let imageSize = CGSizeFromString(someDict["UILaunchImageSize"] as! String)
if __CGSizeEqualToSize(viewSize, imageSize) && viewOr == someDict["UILaunchImageOrientation"] as! String {
launchImageName = someDict["UILaunchImageName"] as! String
}
}
}
let launchImage = UIImage(named: launchImageName)
网友评论