Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions SDWebImageSwiftUI/Classes/ImageViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,21 @@ public class AnimatedImageViewWrapper : PlatformView {
public override init(frame frameRect: CGRect) {
super.init(frame: frameRect)
addSubview(wrapped)
observation = observe(\.wrapped.image, options: [.new]) { _, _ in
observation = observe(\.wrapped.image, options: [.new]) { [weak self] _, _ in
guard let self = self else {
return
}
self.invalidateIntrinsicContentSize()
}
}

public required init?(coder: NSCoder) {
super.init(coder: coder)
addSubview(wrapped)
observation = observe(\.wrapped.image, options: [.new]) { _, _ in
observation = observe(\.wrapped.image, options: [.new]) { [weak self] _, _ in
guard let self = self else {
return
}
self.invalidateIntrinsicContentSize()
}
}
Expand Down
Loading