Fix the public API of AnimatedImage's image property

This commit is contained in:
DreamPiggy 2019-11-09 16:22:29 +08:00
parent bec32bc095
commit 5029a88273
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,6 @@ public final class AnimatedImageCoordinator: NSObject {
public struct AnimatedImage : PlatformViewRepresentable {
// Options
var url: URL?
@State var image: PlatformImage?
var webOptions: SDWebImageOptions = []
var webContext: [SDWebImageContextOption : Any]? = nil
@ -74,6 +73,9 @@ public struct AnimatedImage : PlatformViewRepresentable {
var viewUpdateBlock: ((PlatformView, Context) -> Void)?
static var viewDestroyBlock: ((PlatformView, Coordinator) -> Void)?
/// Current loaded image, may be `SDAnimatedImage` type
@State public var image: PlatformImage?
/// A Binding to control the animation. You can bind external logic to control the animation status.
/// True to start animation, false to stop animation.
@Binding public var isAnimating: Bool