数码资讯
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)
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。