Skip to content

Commit 2b2ee4f

Browse files
committed
Remove the unused ProgressIndicatorWrapper
1 parent f2a7b99 commit 2b2ee4f

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

SDWebImageSwiftUI/Classes/ImageViewWrapper.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,38 +66,6 @@ public class AnimatedImageViewWrapper : PlatformView {
6666
}
6767
}
6868

69-
/// Use wrapper to solve the `UIProgressView`/`NSProgressIndicator` frame origin NaN crash (SwiftUI's bug)
70-
@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *)
71-
public class ProgressIndicatorWrapper : PlatformView {
72-
#if os(macOS)
73-
var wrapped = NSProgressIndicator()
74-
#else
75-
var wrapped = UIProgressView(progressViewStyle: .default)
76-
#endif
77-
78-
#if os(macOS)
79-
public override func layout() {
80-
super.layout()
81-
wrapped.setFrameOrigin(CGPoint(x: round(self.bounds.width - wrapped.frame.width) / 2, y: round(self.bounds.height - wrapped.frame.height) / 2))
82-
}
83-
#else
84-
public override func layoutSubviews() {
85-
super.layoutSubviews()
86-
wrapped.center = self.center
87-
}
88-
#endif
89-
90-
public override init(frame frameRect: CGRect) {
91-
super.init(frame: frameRect)
92-
addSubview(wrapped)
93-
}
94-
95-
public required init?(coder: NSCoder) {
96-
super.init(coder: coder)
97-
addSubview(wrapped)
98-
}
99-
}
100-
10169
@available(iOS 14.0, OSX 11.0, tvOS 14.0, watchOS 7.0, *)
10270
extension PlatformView {
10371
/// Adds constraints to this `UIView` instances `superview` object to make sure this always has the same size as the superview.

0 commit comments

Comments
 (0)