You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add .onFailureImage(someImage) and that does not exist
The text was updated successfully, but these errors were encountered:
luchi17
changed the title
How to add an image in case the loading of the url fails?
How to add an image in case the loading of the url fails? Swift
Nov 19, 2024
luchi17
changed the title
How to add an image in case the loading of the url fails? Swift
How to add an image in case the loading of the url fails? SwiftUI
Nov 19, 2024
the issue can be solved by using AsyncImage or conditional rendering logic like case .empty for loader view , case .success for displaying actual image and case.failure to show a default system image name. If you could please assign the issue to me I would like to fix it.
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Issue Description
I have tried different ways of adding an image in case of failure but I didn't managed.
What
KFImage.url(URL(string: imageUrl))
.placeholder { ProgressView() } // Muestra un indicador mientras carga
.resizable()
.aspectRatio(contentMode: .fit)
.clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous))
.frame(width: 60, height: 60)
.cornerRadius(10)
I tried to add .onFailureImage(someImage) and that does not exist
The text was updated successfully, but these errors were encountered: