diff --git a/SDWebImageSwiftUI/Classes/AnimatedImage.swift b/SDWebImageSwiftUI/Classes/AnimatedImage.swift index 0cea4586..f68107c3 100644 --- a/SDWebImageSwiftUI/Classes/AnimatedImage.swift +++ b/SDWebImageSwiftUI/Classes/AnimatedImage.swift @@ -16,7 +16,7 @@ public struct AnimatedImage: ViewRepresentable { var name: String? var bundle: Bundle? var data: Data? - var scale: Length = 0 + var scale: CGFloat = 0 #if os(macOS) public typealias NSViewType = SDAnimatedImageView @@ -74,7 +74,7 @@ public struct AnimatedImage: ViewRepresentable { self.bundle = bundle } - public init(data: Data, scale: Length = 0) { + public init(data: Data, scale: CGFloat = 0) { self.data = data self.scale = scale } diff --git a/SDWebImageSwiftUI/Classes/ImageManager.swift b/SDWebImageSwiftUI/Classes/ImageManager.swift index 9ce0a288..efad3a47 100644 --- a/SDWebImageSwiftUI/Classes/ImageManager.swift +++ b/SDWebImageSwiftUI/Classes/ImageManager.swift @@ -10,7 +10,7 @@ import SwiftUI import Combine import SDWebImage -class ImageManager : BindableObject { +class ImageManager : ObservableObject { var willChange = PassthroughSubject() var didChange = PassthroughSubject() diff --git a/SDWebImageSwiftUI/Classes/WebImage.swift b/SDWebImageSwiftUI/Classes/WebImage.swift index 43f881a6..22777cf7 100644 --- a/SDWebImageSwiftUI/Classes/WebImage.swift +++ b/SDWebImageSwiftUI/Classes/WebImage.swift @@ -15,7 +15,7 @@ public struct WebImage : View { public var options: SDWebImageOptions public var context: [SDWebImageContextOption : Any]? - @ObjectBinding var imageManager: ImageManager + @ObservedObject var imageManager: ImageManager public init(url: URL, placeholder: Image? = nil, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]? = nil) { self.url = url