diff --git a/README.md b/README.md index e1cbd7f9..c4a0da0e 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,13 @@ If you need animated image, `AnimatedImage` is the one to choose. Remember it su 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. -For more information, it's really recommended to check our demo below, to learn detailed API usage. +For more information, it's really recommended to check our demo, to learn detailed API usage. You can also have a check at the latest API documentation, for advanced usage. + +## Documentation + ++ [SDWebImageSwiftUI API documentation](https://sdwebimage.github.io/SDWebImageSwiftUI/) ++ [SDWebImage API documentation](https://sdwebimage.github.io/) ++ [SDWebImage Wiki](https://github.com/SDWebImage/SDWebImage/wiki/) ## Demo diff --git a/SDWebImageSwiftUI/Classes/AnimatedImage.swift b/SDWebImageSwiftUI/Classes/AnimatedImage.swift index 2295b337..ddbde23e 100644 --- a/SDWebImageSwiftUI/Classes/AnimatedImage.swift +++ b/SDWebImageSwiftUI/Classes/AnimatedImage.swift @@ -17,7 +17,7 @@ import SDWebImageSwiftUIObjC public typealias AnimatedImageViewWrapper = SDAnimatedImageInterfaceWrapper #endif -// Coordinator Life Cycle Binding Object +/// A coordinator object used for `AnimatedImage`native view bridge for UIKit/AppKit/WatchKit. public final class AnimatedImageCoordinator: NSObject { /// Any user-provided object for actual coordinator, such as delegate method, taget-action @@ -27,7 +27,7 @@ public final class AnimatedImageCoordinator: NSObject { public var userInfo: [AnyHashable : Any]? } -// View +/// A Image View type to load image from url, data or bundle. Supports animated and static image format. public struct AnimatedImage : PlatformViewRepresentable { // Options var url: URL? diff --git a/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift b/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift index aac5e20a..a1595707 100644 --- a/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift +++ b/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift @@ -14,6 +14,10 @@ public struct ActivityIndicator: PlatformViewRepresentable { @Binding var isAnimating: Bool var style: Style + /// Create the indicator with animation binding and style + /// - Parameters: + /// - isAnimating: The binding to control the animation + /// - style: The indicator style public init(_ isAnimating: Binding, style: Style = .medium) { self._isAnimating = isAnimating self.style = style diff --git a/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift b/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift index 58c15d64..b9da9e12 100644 --- a/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift +++ b/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift @@ -15,6 +15,11 @@ public struct ProgressIndicator: PlatformViewRepresentable { @Binding var progress: CGFloat var style: Style + /// Create indicator with animation binding, progress binding and the style + /// - Parameters: + /// - isAnimating: The binding to control the animation + /// - progress: The binding to update the progress + /// - style: The indicator style public init(_ isAnimating: Binding, progress: Binding, style: Style = .default) { self._isAnimating = isAnimating self._progress = progress diff --git a/SDWebImageSwiftUI/Classes/WebImage.swift b/SDWebImageSwiftUI/Classes/WebImage.swift index 1111bc29..512fd6ce 100644 --- a/SDWebImageSwiftUI/Classes/WebImage.swift +++ b/SDWebImageSwiftUI/Classes/WebImage.swift @@ -9,6 +9,7 @@ import SwiftUI import SDWebImage +/// A Image View type to load image from url. Supports static image format. public struct WebImage : View { var url: URL? var options: SDWebImageOptions diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj deleted file mode 120000 index 3c5a8e71..00000000 --- a/_Pods.xcodeproj +++ /dev/null @@ -1 +0,0 @@ -Example/Pods/Pods.xcodeproj \ No newline at end of file