Merge pull request #53 from SDWebImage/documentation_generate
Complete all current API documentation and readme
This commit is contained in:
commit
a6b8ba49e9
|
@ -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
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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<Bool>, style: Style = .medium) {
|
||||
self._isAnimating = isAnimating
|
||||
self.style = style
|
||||
|
|
|
@ -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<Bool>, progress: Binding<CGFloat>, style: Style = .default) {
|
||||
self._isAnimating = isAnimating
|
||||
self._progress = progress
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Example/Pods/Pods.xcodeproj
|
Loading…
Reference in New Issue