From 7eb8df7f203857748d84f325dd82a443326f174b Mon Sep 17 00:00:00 2001 From: leoz Date: Sun, 25 Feb 2024 09:58:40 -0500 Subject: Use configuration for image rotation --- Demo/SwiftyCropDemo/ContentView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Demo/SwiftyCropDemo') diff --git a/Demo/SwiftyCropDemo/ContentView.swift b/Demo/SwiftyCropDemo/ContentView.swift index c999dd3..235a862 100644 --- a/Demo/SwiftyCropDemo/ContentView.swift +++ b/Demo/SwiftyCropDemo/ContentView.swift @@ -13,6 +13,7 @@ struct ContentView: View { @State private var selectedImage: UIImage? @State private var selectedShape: MaskShape = .square @State private var cropImageCircular: Bool = false + @State private var rotateImage: Bool = true var body: some View { VStack { @@ -69,7 +70,8 @@ struct ContentView: View { imageToCrop: selectedImage, maskShape: selectedShape, configuration: SwiftyCropConfiguration( - cropImageCircular: cropImageCircular + cropImageCircular: cropImageCircular, + rotateImage: rotateImage ) ) { croppedImage in // Do something with the returned, cropped image -- cgit v1.2.3