From f2f51de40ea4a3643241bbd37c6d133a79b3e6eb Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sun, 5 Apr 2020 13:50:35 +0800 Subject: [PATCH] Update the readme about the placeholder ViewBuilder on AnimatedImage --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 41c27ff..099588d 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,10 @@ var body: some View { } .resizable() // Resizable like SwiftUI.Image, you must use this modifier or the view will use the image bitmap size .placeholder(UIImage(systemName: "photo")) // Placeholder Image + // Supports ViewBuilder as well + .placeholder { + Circle().foregroundColor(.gray) + } .indicator(SDWebImageActivityIndicator.medium) // Activity Indicator .transition(.fade) // Fade Transition .scaledToFit() // Attention to call it on AnimatedImage, but not `some View` after View Modifier (Swift Protocol Extension method is static dispatched)