iOS 加载 base64图片

@bingoogolapple 2016-07-18 09:02:25发表于 bingoogolapple/bingoogolapple.github.io iOS

let base64Str = "data:image/png;base64,\(imageStr)".stringByReplacingOccurrencesOfString("\n", withString: "")
let url = NSURL(string: base64Str)
let imageData = NSData(contentsOfURL: url!)!
let image = UIImage(data: imageData)