Releases: onevcat/Kingfisher
6.1.1 - SwiftUI Issues
Fix
- Remove unnecessary queue dispatch when setting image result. This prevents image flickering when some situation. #1615
- Now the
KF
builder methods also accept optionalURL
orSource
. It aligns the syntax with the normal view extension methods. #1617 - Fix an issue that wrong hash is calculated for
ImageBinder
. It might cause view state lost for aKFImage
. #1624 - Now the
ImageCache
will disable the disk storage when there is no free space on disk when creating the cache folder, instead of just crashing it. #1628 - A workaround for
@State
lost when using a view inside another container in aLazy
stack or grid. #1631 - Performance improvement for images with an non-up orientation in Exif when displaying in
KFImage
. #1629
6.1.0 - SwiftUI Rework
Add
- Rewrite state management for
KFImage
. Now the image reloading works in a more stable way without task dispatching. #1604 - Add
fade
andforceTransition
modifier toKFImage
to support built-in fade in effect when loading image in SwiftUI. #1604
Fix
- When an
ImageModifier
is applied, the modified image is not cached to memory cache anymore. TheImageModifier
is intended to be used just before setting the image to a view and now it works as expected. #1612 - Now
SwiftUI
andCombine
are declared as weak link in podspec. This is a workaround for some rare case build issue. It does not affect supported deploy version of Kingfisher. #1607 - Remove header file from podspec to allow Kingfisher built as a static framework in a Swift-ObjC mixed project. #1608
6.0.1 - Bind & Hug
Fix
- Start the binder again when
KFImage
initialized, to keep the same behavior as previous versions. #1594
6.0.0 - New Year 2021
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. #1571 -
Some 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
5.15.8 - KFImage handler
Fix
- An issue caused the
onSuccess
handler not be called when the image is already cached. #1570
5.15.7 - Cancel Lock
Fix
- A potential crash when cancelling image downloading task while accessing its original request on iOS 13 or earlier. #1558
5.15.6 - ImageBinder Callback
Fix
- Prevent main queue dispatching in
ImageBinder
if it is already on main thread. This prevents unintended flickering when reloading. #1551
5.15.5 - Cancelling Fix
Fix
- A possible fix for the crashes when cancelling a huge amount of image tasks too fast. [#1537]
5.15.4 - Farewell Objective-C (CocoaPods)
Fix
- Give
SessionDelegate
an Objective-C name so it can work with other libraries even added by a dependency which generates Objective-C header. #1532
5.15.3 - Farewell Objective-C
Fix
- Removed the unnecessary ObjC header generating and module defining due to Xcode 12 is now generating conflicted types even for different libraries. #1517
- Set deploy target for SwiftUI target and its pod spec to iOS 10 and macOS 10.12, which aligns to the settings of core framework. That resolves some dependency issues when using CocoaPods for both app target and extension targets. But it does not mean you can use the SwiftUI support on those minimal target. All related APIs are still unavailable on old system versions. #1524