Update Sources/CropImage/CropImageView.swift

Co-authored-by: Shibo Lyu <github@shibolyu.com>
This commit is contained in:
Ahnaf Mahmud 2024-03-22 02:25:39 +00:00 committed by Shibo Lyu
parent 4e0f333e2f
commit 517fb0c003

View file

@ -141,7 +141,7 @@ public struct CropImageView<Controls: View, CutHole: View>: View {
fulfillTargetFrame: fulfillTargetFrame
)
.frame(width: targetSize.width, height: targetSize.height)
if #available(iOS 16.0, macOS 13.0, *) {
if #available(iOS 16.0, macOS 13.0, visionOS 1.0, *) {
let renderer = ImageRenderer(content: snapshotView)
renderer.scale = targetScale
#if !os(macOS)