Skip to content

Commit

Permalink
Fix the public API of AnimatedImage's image property
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Nov 9, 2019
1 parent bec32bc commit 5029a88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SDWebImageSwiftUI/Classes/AnimatedImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5029a88

Please sign in to comment.