IOS开发-使用Kingfisher加载图片
简介:
Kingfisher (中文名:翠鸟) 是一个异步下载和缓存图片的库,SDWebImage的Swift 实现版。
https://github.com/onevcat/Kingfisher
开发环境:
Xcode 8.0 Swift 2.3
Cocoapod:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! pod 'Kingfisher', '~> 2.6'
在XCode 8+使用Swift 2.3 需要注意的配置事项:
http://www.voidcn.com/article/p-dqrhaxmb-qh.html
简单的使用方法
imageView.kf_setImageWithURL(NSURL(string: "http://your_image_url.png")!, placeholderImage: nil)