Skip to content

Commit a6b8ba4

Browse files
authored
Merge pull request #53 from SDWebImage/documentation_generate
Complete all current API documentation and readme
2 parents 63c3059 + bab0072 commit a6b8ba4

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ If you need animated image, `AnimatedImage` is the one to choose. Remember it su
163163

164164
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.
165165

166-
For more information, it's really recommended to check our demo below, to learn detailed API usage.
166+
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.
167+
168+
## Documentation
169+
170+
+ [SDWebImageSwiftUI API documentation](https://sdwebimage.github.io/SDWebImageSwiftUI/)
171+
+ [SDWebImage API documentation](https://sdwebimage.github.io/)
172+
+ [SDWebImage Wiki](https://github.com/SDWebImage/SDWebImage/wiki/)
167173

168174
## Demo
169175

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import SDWebImageSwiftUIObjC
1717
public typealias AnimatedImageViewWrapper = SDAnimatedImageInterfaceWrapper
1818
#endif
1919

20-
// Coordinator Life Cycle Binding Object
20+
/// A coordinator object used for `AnimatedImage`native view bridge for UIKit/AppKit/WatchKit.
2121
public final class AnimatedImageCoordinator: NSObject {
2222

2323
/// Any user-provided object for actual coordinator, such as delegate method, taget-action
@@ -27,7 +27,7 @@ public final class AnimatedImageCoordinator: NSObject {
2727
public var userInfo: [AnyHashable : Any]?
2828
}
2929

30-
// View
30+
/// A Image View type to load image from url, data or bundle. Supports animated and static image format.
3131
public struct AnimatedImage : PlatformViewRepresentable {
3232
// Options
3333
var url: URL?

SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ public struct ActivityIndicator: PlatformViewRepresentable {
1414
@Binding var isAnimating: Bool
1515
var style: Style
1616

17+
/// Create the indicator with animation binding and style
18+
/// - Parameters:
19+
/// - isAnimating: The binding to control the animation
20+
/// - style: The indicator style
1721
public init(_ isAnimating: Binding<Bool>, style: Style = .medium) {
1822
self._isAnimating = isAnimating
1923
self.style = style

SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ public struct ProgressIndicator: PlatformViewRepresentable {
1515
@Binding var progress: CGFloat
1616
var style: Style
1717

18+
/// Create indicator with animation binding, progress binding and the style
19+
/// - Parameters:
20+
/// - isAnimating: The binding to control the animation
21+
/// - progress: The binding to update the progress
22+
/// - style: The indicator style
1823
public init(_ isAnimating: Binding<Bool>, progress: Binding<CGFloat>, style: Style = .default) {
1924
self._isAnimating = isAnimating
2025
self._progress = progress

SDWebImageSwiftUI/Classes/WebImage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import SwiftUI
1010
import SDWebImage
1111

12+
/// A Image View type to load image from url. Supports static image format.
1213
public struct WebImage : View {
1314
var url: URL?
1415
var options: SDWebImageOptions

_Pods.xcodeproj

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)