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
Copy file name to clipboardExpand all lines: SDWebImageSwiftUI/Classes/WebImage.swift
+73-9Lines changed: 73 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,6 @@ import SDWebImage
11
11
12
12
/// A Image View type to load image from url. Supports static image format.
13
13
publicstructWebImage:View{
14
-
varurl:URL?
15
-
varoptions:SDWebImageOptions
16
-
varcontext:[SDWebImageContextOption:Any]?
17
-
18
14
varconfigurations:[(Image)->Image]=[]
19
15
20
16
varplaceholder:AnyView?
@@ -23,14 +19,16 @@ public struct WebImage : View {
23
19
24
20
@ObservedObjectvarimageManager:ImageManager
25
21
22
+
// Animated Image support (Beta)
23
+
varanimated:Bool=false
24
+
@StatevarcurrentFrame:PlatformImage?=nil
25
+
@StatevarimagePlayer:SDAnimatedImagePlayer?=nil
26
+
26
27
/// Create a web image with url, placeholder, custom options and context.
27
28
/// - Parameter url: The image url
28
29
/// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values.
29
30
/// - Parameter context: A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold.
/// Make the image to support animated images. The animation will start when view appears, and pause when disappears.
220
+
/// - Note: Currently we do not have advanced control like binding, reset frame index, playback rate, etc. For those use case, it's recommend to use `AnimatedImage` type instead. (support iOS/tvOS/macOS)
221
+
/// - Warning: This API need polishing. In the future we may choose to create a new View type instead.
222
+
///
223
+
/// - Parameter animated: Whether or not to enable animationn.
0 commit comments