SDWebImageSwiftUI icon indicating copy to clipboard operation
SDWebImageSwiftUI copied to clipboard

Unable to load error placeholder

Open RelatApp opened this issue 3 years ago • 2 comments

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

RelatApp avatar Mar 30 '21 14:03 RelatApp

delayPlaceholder is the feature for this use case.

  1. indicator: Showing only when loading
  2. 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.

dreampiggy avatar Mar 31 '21 03:03 dreampiggy

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

RelatApp avatar Mar 31 '21 10:03 RelatApp