Skip to content

Commit

Permalink
Update to the latest Xcode 11-beta5 syntax of SwiftUI
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Aug 9, 2019
1 parent 30cf499 commit 2ba0919
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SDWebImageSwiftUI/Classes/AnimatedImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSwiftUI/Classes/ImageManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import Combine
import SDWebImage

class ImageManager : BindableObject {
class ImageManager : ObservableObject {
var willChange = PassthroughSubject<ImageManager, Never>()
var didChange = PassthroughSubject<ImageManager, Never>()

Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSwiftUI/Classes/WebImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ba0919

Please sign in to comment.