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/AnimatedImage.swift
+93-6Lines changed: 93 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -52,10 +52,21 @@ public struct AnimatedImage : PlatformViewRepresentable {
52
52
/// True to start animation, false to stop animation.
53
53
@BindingpublicvarisAnimating:Bool
54
54
55
+
/// Create an animated image with url, placeholder, custom options and context.
56
+
/// - Parameter url: The image url
57
+
/// - Parameter placeholder: The placeholder image to show during loading
58
+
/// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values.
59
+
/// - 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.
/// Create an animated image with url, placeholder, custom options and context, including animation control binding.
65
+
/// - Parameter url: The image url
66
+
/// - Parameter placeholder: The placeholder image to show during loading
67
+
/// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values.
68
+
/// - 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.
69
+
/// - Parameter isAnimating: The binding for animation control
/// Provide a max buffer size by bytes. This is used to adjust frame buffer count and can be useful when the decoding cost is expensive (such as Animated WebP software decoding). Default is nil.
404
+
// `0` or nil means automatically adjust by calculating current memory usage.
405
+
// `1` means without any buffer cache, each of frames will be decoded and then be freed after rendering. (Lowest Memory and Highest CPU)
406
+
// `UInt.max` means cache all the buffer. (Lowest CPU and Highest Memory)
/// Whehter or not to enable incremental image load for animated image. See `SDAnimatedImageView` for detailed explanation for this.
414
+
/// - Note: If you are confused about this description, open Chrome browser to view some large GIF images with low network speed to see the animation behavior.
415
+
/// Default is true. Set to false to only render the static poster for incremental animated image.
416
+
/// - Parameter incrementalLoad: Whether or not to incremental load
/// - action: The action to perform. The first arg is the loaded image, the second arg is the cache type loaded from. If `action` is `nil`, the call has no effect.
438
+
/// - Returns: A view that triggers `action` when this image load successes.
/// Provide the action when image load progress changes.
445
+
/// - Parameters:
446
+
/// - action: The action to perform. The first arg is the received size, the second arg is the total size, all in bytes. If `action` is `nil`, the call has no effect.
447
+
/// - Returns: A view that triggers `action` when this image load successes.
Copy file name to clipboardExpand all lines: SDWebImageSwiftUI/Classes/WebImage.swift
+31-4Lines changed: 31 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,11 @@ public struct WebImage : View {
19
19
20
20
@ObservedObjectvarimageManager:ImageManager
21
21
22
+
/// Create a web image with url, placeholder, custom options and context.
23
+
/// - Parameter url: The image url
24
+
/// - Parameter placeholder: The placeholder image to show during loading
25
+
/// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values.
26
+
/// - 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.
/// - action: The action to perform. The first arg is the loaded image, the second arg is the cache type loaded from. If `action` is `nil`, the call has no effect.
115
+
/// - Returns: A view that triggers `action` when this image load successes.
/// Provide the action when image load progress changes.
122
+
/// - Parameters:
123
+
/// - action: The action to perform. The first arg is the received size, the second arg is the total size, all in bytes. If `action` is `nil`, the call has no effect.
124
+
/// - Returns: A view that triggers `action` when this image load successes.
0 commit comments