diff options
author | Ben <31181527+benedom@users.noreply.github.com> | 2024-02-27 09:08:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 09:08:15 +0100 |
commit | b3dbe07734759677e3ce2d6d090249738fdbc882 (patch) | |
tree | 44101318b0622cce4c8791b282962118d437e073 /Demo/SwiftyCropDemo | |
parent | 29a39f48c6d81eb66df008699259cc7fead3b0a1 (diff) | |
parent | b1f3174b0a363e30ddda0d15f819dc9b0bef5fc9 (diff) |
Merge pull request #4 from leoz/master
Rotate image
Diffstat (limited to 'Demo/SwiftyCropDemo')
-rw-r--r-- | Demo/SwiftyCropDemo/ContentView.swift | 5 |
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 |