diff options
author | Benedikt Betz <benedikt.betz@bueroscharf.de> | 2023-10-20 10:37:45 +0200 |
---|---|---|
committer | Benedikt Betz <benedikt.betz@bueroscharf.de> | 2023-10-20 10:37:45 +0200 |
commit | 63a6d66b2505c3fecfe65b92ee77e40fb4cf34b9 (patch) | |
tree | d7c78ada46b501ea56c3b15c15611b9bf2fd22f7 /README.md | |
parent | b9a35b685290edb2836ff364c3f003668497a5d4 (diff) |
Adjust asset size, edit README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -118,14 +118,27 @@ struct ExampleView: View { } ``` -You can also configure `SwiftyCropView` by passing a `SwiftyCropConfiguration`: +SwiftyCrop supports two different mask shapes for cropping: +- `circle` +- `square` + +This is only the shape of the mask the user will see when cropping the image. The resulting, cropped image will always be a square. + +You can also configure `SwiftyCropView` by passing a `SwiftyCropConfiguration`. A configuration has the following properties: + +| Property | Description | +| ----------- | ----------- | +| `maxMagnificationScale` | `CGFloat`: The maximum scale factor that the image can be magnified while cropping. Defaults to `4.0`. | +| `maskRadius` | `CGFloat`: The radius of the mask used for cropping. Defaults to `130`. A good way is to make it dependend on the screens size. | + +Create a configuration like this: ```swift let configuration = SwiftyCropConfiguration( maxMagnificationScale = 4.0, maskRadius: 130 ) ``` - +and use it like this: ```swift .fullScreenCover(isPresented: $showImageCropper) { if let selectedImage = selectedImage { |