美文网首页
获取本地的lanuchImage

获取本地的lanuchImage

作者: 艾希_可可 | 来源:发表于2019-11-28 15:34 被阅读0次
    static func getLaunchImage()->UIImage{
        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 lanuchImage = UIImage(named: launchImageName)!
        return lanuchImage
    }
    

    相关文章

      网友评论

          本文标题:获取本地的lanuchImage

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