From 5029a88273b7c384dde0bb9a4cf03392ab607339 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sat, 9 Nov 2019 16:22:29 +0800 Subject: [PATCH] Fix the public API of AnimatedImage's image property --- SDWebImageSwiftUI/Classes/AnimatedImage.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SDWebImageSwiftUI/Classes/AnimatedImage.swift b/SDWebImageSwiftUI/Classes/AnimatedImage.swift index a1974d81..7a55f3bb 100644 --- a/SDWebImageSwiftUI/Classes/AnimatedImage.swift +++ b/SDWebImageSwiftUI/Classes/AnimatedImage.swift @@ -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