aboutsummaryrefslogtreecommitdiff
path: root/Demo/SwiftyCropDemo
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/SwiftyCropDemo')
-rw-r--r--Demo/SwiftyCropDemo/ContentView.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/Demo/SwiftyCropDemo/ContentView.swift b/Demo/SwiftyCropDemo/ContentView.swift
index c999dd3..cfb1f01 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 {
@@ -56,6 +57,7 @@ struct ContentView: View {
)
}
Toggle("Crop image to circle", isOn: $cropImageCircular)
+ Toggle("Rotate image", isOn: $rotateImage)
}
.buttonStyle(.bordered)
.padding()
@@ -69,7 +71,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