-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KFImage does not being displayed in some cases after 6.2.1 #1660
Comments
Hi, Maybe you can try to call KFImage.url(url)
.resizable()
.onSuccess { r in print("done") }
.loadImmediately() // Add this after the last chained call for `KFImage`
.frame(height: 100) // Other `SwiftUI.View` modifiers In 6.1, we tried a new implementation which "keeps" the image state between
|
Not the OP but I have the exact same problem and indeed, adding @onevcat is this the recommended usage or just a temporary workaround? |
It is the recommended usage until we can drop iOS 13 support (Maybe later this year when iOS 15 comes out!) |
@onevcat Do you plan to do an availability check to use StateObject ? or at least add a warning on Readme ? |
@netbe It is hard to choose it with an availability check, which does not support a type member. The plan is switching to |
We are encountering this as well, it feels pretty broken. Maybe |
@wilg It once was, but in a recent syntax improvement for a chain-able configuration, there is no way to call it unexplicitly. Furthermore, an image loading every time when the layout changed is also not a desired behavior. A patch for switching to |
OK, I'll try that. I guess my thinking is that this is such a serious bug that Kingfisher is essentially unusable in SwiftUI without it, so it might be worth doing something drastic. It took us a long time to figure out that this was a Kingfisher issue, and we shipped some bad releases until we figured it out today. |
@wilg Oh! I am very sorry to hear that. I really hope we can solve it by dropping the broken |
The |
This is already fixed in version 7 (currently in beta). The There are still some other features in plan & waiting fixes from Apple's Xcode 13 betas. Kingfisher v7 won't be officially released before there is a GM version of new iOS 15 and Xcode 13. |
I still facing the same issue KF v7, i roll back to v6.3.1 and added loadImmediately only this setup fixing issue in 99%, in my app is list with paging that loads data async way 20 item per page, and even this setup some but occurs but not often 1-5% if scrolling is fast, wifi or LTE it doesn't matter. |
For issues with iOS 16 (before iOS 16.4), I believe it was another issue mentioned in #1988 Please check there for the detail and some possible workaround. This issue should not happen when building with Xcode 14.3 and for deploy targets later than iOS 16.4. |
Issue Description
Images not being displayed after pod update to 6.2.1. in SwiftUI app
What
Works fine after I reverted back to 6.1.1
Reproduce
[The steps to reproduce this issue. What is the url you were trying to load, where did you put your code, etc.]
Other Comment
[Add anything else here]
The text was updated successfully, but these errors were encountered: