diff --git a/CHANGELOG.md b/CHANGELOG.md index 881280b..18e426b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # NukeUI 0.x +## NukeUI 0.6.2 + +*Jul 8, 2021* + +- Revert the changes to `Image` sizing behavior. Now it again simply takes all the available space and you can use `resizingMode` to change the image rendering behavior. + ## NukeUI 0.6.1 *Jun 11, 2021* diff --git a/Sources/Image.swift b/Sources/Image.swift index 1f8d06f..0bc0fde 100644 --- a/Sources/Image.swift +++ b/Sources/Image.swift @@ -26,7 +26,7 @@ public struct Image: NSViewRepresentable { } public func makeNSView(context: Context) -> ImageView { - let view = ImageViewWrapper() + let view = ImageView() onCreated?(view) return view } @@ -53,7 +53,7 @@ public struct Image: UIViewRepresentable { } public func makeUIView(context: Context) -> ImageView { - let imageView = ImageViewWrapper() + let imageView = ImageView() if let resizingMode = self.resizingMode { imageView.resizingMode = resizingMode } diff --git a/Sources/ImageView.swift b/Sources/ImageView.swift index 4a7a287..7b7f2e8 100644 --- a/Sources/ImageView.swift +++ b/Sources/ImageView.swift @@ -240,24 +240,4 @@ public class ImageView: _PlatformBaseView { view.isHidden = true } } - -final class ImageViewWrapper: ImageView { - #if os(iOS) || os(tvOS) - var _intrinsicContentSize: CGSize = CGSize(width: -1, height: -1) - - override var intrinsicContentSize: CGSize { - _intrinsicContentSize - } - - override var imageContainer: ImageContainer? { - get { super.imageContainer } - set { - super.imageContainer = newValue - _intrinsicContentSize = systemLayoutSizeFitting(_PlatformBaseView.layoutFittingCompressedSize) - invalidateIntrinsicContentSize() - } - } - #endif -} - #endif