Skip to content

Commit f2f51de

Browse files
committed
Update the readme about the placeholder ViewBuilder on AnimatedImage
1 parent cd187c8 commit f2f51de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ var body: some View {
163163
}
164164
.resizable() // Resizable like SwiftUI.Image, you must use this modifier or the view will use the image bitmap size
165165
.placeholder(UIImage(systemName: "photo")) // Placeholder Image
166+
// Supports ViewBuilder as well
167+
.placeholder {
168+
Circle().foregroundColor(.gray)
169+
}
166170
.indicator(SDWebImageActivityIndicator.medium) // Activity Indicator
167171
.transition(.fade) // Fade Transition
168172
.scaledToFit() // Attention to call it on AnimatedImage, but not `some View` after View Modifier (Swift Protocol Extension method is static dispatched)

0 commit comments

Comments
 (0)