From ee15f67f8b759328f2f30cd0774110363563ce28 Mon Sep 17 00:00:00 2001 From: benedom <31181527+benedom@users.noreply.github.com> Date: Fri, 10 May 2024 12:22:35 +0200 Subject: Added zoom sensitivity to configuration Also decreased default sensitivity when zooming --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index a15102c..167e588 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ You can also configure `SwiftyCropView` by passing a `SwiftyCropConfiguration`. | `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. | | `cropImageCircular` | `Bool`: When using the cropping mask `circle`, whether the resulting image should also be masked as circle. Defaults to `false`. | | `rotateImage` | `Bool`: Whether the image can be rotated when cropping using pinch gestures. Defaults to `true`. | +| `zoomSensitivity` | `CGFloat`: Zoom sensitivity when cropping. Increase to make zoom faster / less sensitive. Defaults to `1.0`. | Create a configuration like this: ```swift @@ -151,7 +152,8 @@ let configuration = SwiftyCropConfiguration( maxMagnificationScale = 4.0, maskRadius: 130, cropImageCircular: false, - rotateImage: true + rotateImage: true, + zoomSensitivity = 1.0 ) ``` and use it like this: -- cgit v1.2.3