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/ImageManager.swift
+58-12Lines changed: 58 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,21 @@
9
9
import SwiftUI
10
10
import SDWebImage
11
11
12
+
/// A Image observable object for handle image load process. This drive the Source of Truth for image loading status.
13
+
/// You can use `@ObservedObject` to associate each instance of manager to your View type, which update your view's body from SwiftUI framework when image was loaded.
/// Create a image manager for loading the specify url, with custom options and context.
37
+
/// - Parameter url: The image url
38
+
/// - Parameter options: The options to use when downloading the image. See `SDWebImageOptions` for the possible values.
39
+
/// - 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.
122
+
/// - Returns: A view that triggers `action` when this image load successes.
/// Provide the action when image load progress changes.
129
+
/// - Parameters:
130
+
/// - 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.
131
+
/// - Returns: A view that triggers `action` when this image load successes.
0 commit comments