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
.scaledToFit() // Attention to call it on AnimatedImage, but not `some View` after View Modifier
@@ -155,7 +157,7 @@ If you don't need animated image, prefer to use `WebImage` firstly. Which behave
155
157
156
158
If you need animated image, `AnimatedImage` is the one to choose. Remember it supports static image as well, you don't need to check the format, just use as it.
157
159
158
-
But, because `AnimatedImage` use `UIViewRepresentable` and driven by UIKit, currently there may be some small incompatible issues between UIKit and SwiftUI layout and animation system. We try our best to match SwiftUI behavior, and provide the same API as `WebImage`, which make it easy to switch between these two types.
160
+
But, because `AnimatedImage` use `UIViewRepresentable` and driven by UIKit, currently there may be some small incompatible issues between UIKit and SwiftUI layout and animation system, or bugs related to SwiftUI itself. We try our best to match SwiftUI behavior, and provide the same API as `WebImage`, which make it easy to switch between these two types if needed.
159
161
160
162
For more information, it's really recommended to check our demo below, to learn detailed API usage.
Copy file name to clipboardExpand all lines: SDWebImageSwiftUI/Classes/WebImage.swift
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,17 @@ extension WebImage {
151
151
return result
152
152
}
153
153
154
+
/// Associate a placeholder image when loading image with url
155
+
/// - note: This placeholder image will apply the same size and resizable from WebImage for convenience. If you don't want this, use the ViewBuilder one above instead
156
+
/// - Parameter image: A Image view that describes the placeholder.
0 commit comments