SDWebImageSwiftUI
SDWebImageSwiftUI copied to clipboard
Unable to load error placeholder
Experienced in android, noob in swiftui, i can t find the way to display a specific placeholder on error . Some indications are given : .delayPlaceholder but this is quite vague for someone with little experience . No specific help from the demo part . Sorry if this appears obvious for most of you
delayPlaceholder is the feature for this use case.
- indicator: Showing only when loading
- delayPlaceholder + placeholder: Showing only when failed
You can use both of them together. Or you can use onSuccess
, onFailed
to achieve the same result.
However, current SDWebImageSwiftUI on iOS 14 has bugs with delayPlaceholder. Try iOS 13 and see the result.
Fixing solution is #180, but need some testing.
Thank you for your answser. I'm on Ios14.Coming from android background the logic is clear for me but the details aren t . I don t know if on failure i can force load the same SDimage or if , for example ,i must make this image invisible (placeholder is still visible in case of error) and make an Image appear . Anyway, thank you for your time