Skip to content

Commit a62f9a9

Browse files
committed
Move the watchOS wrapper into the ImageViewWrapper.swift file
1 parent 140bf0b commit a62f9a9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88

99
import SwiftUI
1010
import SDWebImage
11-
#if canImport(SDWebImageSwiftUIObjC)
12-
import SDWebImageSwiftUIObjC
13-
#endif
14-
15-
// Convenient
16-
#if os(watchOS)
17-
public typealias AnimatedImageViewWrapper = SDAnimatedImageInterfaceWrapper
18-
#endif
1911

2012
/// A coordinator object used for `AnimatedImage`native view bridge for UIKit/AppKit/WatchKit.
2113
public final class AnimatedImageCoordinator: NSObject {

SDWebImageSwiftUI/Classes/ImageViewWrapper.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
import Foundation
1010
import SDWebImage
11+
#if canImport(SDWebImageSwiftUIObjC)
12+
import SDWebImageSwiftUIObjC
13+
#endif
14+
15+
#if os(watchOS)
16+
/// Use wrapper to solve the `WKInterfaceImage` aspect issue (SwiftUI's Bug)
17+
public typealias AnimatedImageViewWrapper = SDAnimatedImageInterfaceWrapper
18+
#endif
1119

1220
#if !os(watchOS)
1321

0 commit comments

Comments
 (0)