将网络图片转成UIImage

    func getImageFromUrl(fileUrl: String) -> UIImage? {
        let data = try? Data(contentsOf: URL(string: fileUrl)!)
        let result = UIImage(data: data!)
        
        return result
    }

你可能感兴趣的:(将网络图片转成UIImage)