Closed cpd closed 2 years ago
Hi,
Placeholder is displayed while the image is loading. If the download fails, a failureImage
is displayed. You can find more info in the documentation.
It's designed very similarly to the newest Apple's AsyncImage
API where placeholder fills the space during loading:
Until the image loads, the view displays a standard placeholder that fills the available space. After the load completes successfully, the view updates to display the image. In the example above, the icon is smaller than the frame, and so appears smaller than the placeholder.
If you think it's something that's worth adding to the guide designed to help switching from Kingfisher, PRs are welcome.
Placeholder is displayed while the image is loading. If the download fails, a failureImage is displayed. You can find more info in the documentation.
Somehow I missed that.. thanks, that's what I was looking for
It's designed very similarly to the newest Apple's AsyncImage
while the 'placeholder' is used in same way the AsyncImage
api expects a closure that returns View
so you can return a progress view which makes more sense than just an image, anyway, failureImage
looks ok for my use cases, thanks for clarifications.
LazyImageView
from NukeUI has a placeholderView
option. I'm focusing on this framework for providing UI-related features.
Hi, I'm trying to switch to Nuke from Kingfisher, I found that passing invalid url to
request
parameter inNuke.loadImage
results in emptyUIImageView
(placeholder that's passed inImageLoadingOptions
is not used) It's weird because that's what placeholder should do (be displayed if there's problems with loading actual image)Kingfisher shows placeholder if passed url is broken which looks 'the correct way', accepting optional url and not displaying placeholder if url is nil doesn't look the obvious behaviour, did I miss something?