Kingfisher v6.0.0 Release Notes
Release Date: 2021-01-03 // about 3 years ago-
โ Add
A
KF
shorthand to create image setting tasks and config them. It provides a cleaner and modern way to use Kingfisher. Now, instead of usingimageView.kf.setImage(with:options:)
, you can perform chain-able invocation withKF
helpers. For example, the code below is identical. #1546// Old way imageView.kf.setImage( with: url, placeholder: localImage, options: [.transition(.fade(1)), .loadDiskFileSynchronously], progressBlock: { receivedSize, totalSize in print("progressBlock") }, completionHandler: { result in print(result) } ) // New way KF.url(url) .placeholder(localImage) .fade(duration: 1) .loadDiskFileSynchronously() .onProgress { _ in print("progressBlock") } .onSuccess { result in print(result) } .onFailure { err in print("Error: \(err)") } .set(to: imageView)
Similar to
KF
, TheKFImage
for SwiftUI is now having the similar chain-able syntax to setup an image task and options. This makes theKFImage
APIs closer to the way how SwiftUI code is written. #1586โ Add support for
TVMonogramView
on tvOS. #1571Some important properties and method in
AnimatedImageView.Animator
are marked aspublic
now. It provides some useful information of the decoded GIF files. #1575๐ An
AsyncImageDownloadRequestModifier
to support modifying the request in an asynchronous way. #1589โ Add a
.lowDataMode
option to support for Low Data Mode. When the.lowDataMode
option is provided with an alternative source (usually a low-resolution version of the original image), Kingfisher will respect user's Low Data Mode setting and download the alternative image instead. #1590
๐ Fix
- ๐ An issue that importing AppKit wrongly in a macCatalyst build. #1547
โ Remove
- ๐ Deprecated types, methods and properties are removed. If you are still using
Kingfisher.Image
,Kingfisher.ImageView
orKingfisher.Button
, use the equivalentKFCrossPlatform
types (such asKFCrossPlatformImage
, etc) instead. Please make sure you do not have any warnings before migrate to Kingfisher v6. For more about the removed deprecated things, check #1525. - โฌ๏ธ The standalone framework target of SwiftUI support is removed. Now the SwiftUI support is a part in the main Kingfisher library. To upgrade to v6, first remove
Kingfisher/SwiftUI
subpod (if you are using CocoaPods) or remove theKingfisherSwiftUI
target (if you are using Carthage or Swift Package Manager), then reinstall Kingfisher. #1574