pod update
before filing this issue.Which version of the library were you using? 2.0.12
Which version of iOS are you running? 10.3.2
What model of iOS device were you testing on? iPhone 5s
If using CocoaPods, which version of CocoaPods are you on? 1.2.0
Crop images to fixed aspect ration of 1:1 (square images). I therefore set aspectRatioLockEnabled
and aspectRatioPreset
. This should also be preserved after pressing undo.
The user is only allowed to crop the image with a square aspect ratio. Also after pressing undo.
The crop view is locked to square aspect ratio as long as the user does not press undo. Once he does press undo the crop view does loose its square lock.
Configure crop view controller to only allow square aspect ratio:
let cropViewController = TOCropViewController(image: pickedImage)
cropViewController.aspectRatioLockEnabled = true
cropViewController.aspectRatioPickerButtonHidden = true
cropViewController.aspectRatioPreset = .presetSquare
I just realised this can be fixed by setting
cropViewController.resetAspectRatioEnabled = false
Most helpful comment
I just realised this can be fixed by setting
cropViewController.resetAspectRatioEnabled = false