KingfisherExtension base on Kingfisher. Remake image before caching by style.
iOS 8.0
Swift 3.0
- Make your Transformer conform ImageReducible protocol.
struct Transformer: ImageReducible {
let URLString: String
let style: ImageStyle
}
- And, set transformer for your imageView
let round: ImageStyle = .RoundedRectangle(size: CGSize(width: 60.0, height: 60.0), cornerRadius: 16.0, borderWidth: 0)
let transformer = Transformer(URLString: URLString, style: round)
imageView.kfe_setImage(byTransformer: transformer)
Check the demo for more information.
pod 'KingfisherExtension', '~> 1.0.1'
github "Limon-O-O/KingfisherExtension"
Contact me on Twitter or Weibo . If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.
KingfisherExtension is available under the MIT license. See the LICENSE file for more info.