Skip to content

Commit 5029a88

Browse files
committed
Fix the public API of AnimatedImage's image property
1 parent bec32bc commit 5029a88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public final class AnimatedImageCoordinator: NSObject {
3636
public struct AnimatedImage : PlatformViewRepresentable {
3737
// Options
3838
var url: URL?
39-
@State var image: PlatformImage?
4039
var webOptions: SDWebImageOptions = []
4140
var webContext: [SDWebImageContextOption : Any]? = nil
4241

@@ -74,6 +73,9 @@ public struct AnimatedImage : PlatformViewRepresentable {
7473
var viewUpdateBlock: ((PlatformView, Context) -> Void)?
7574
static var viewDestroyBlock: ((PlatformView, Coordinator) -> Void)?
7675

76+
/// Current loaded image, may be `SDAnimatedImage` type
77+
@State public var image: PlatformImage?
78+
7779
/// A Binding to control the animation. You can bind external logic to control the animation status.
7880
/// True to start animation, false to stop animation.
7981
@Binding public var isAnimating: Bool

0 commit comments

Comments
 (0)