Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed aspect ration is not preserved after undo #166

Closed
2 tasks done
funkenstrahlen opened this issue May 2, 2017 · 1 comment
Closed
2 tasks done

Fixed aspect ration is not preserved after undo #166

funkenstrahlen opened this issue May 2, 2017 · 1 comment

Comments

@funkenstrahlen
Copy link

  • I have read this issue template and provided all possible information.
  • I'm using CocoaPods and have run pod update before filing this issue.

Hardware / Software

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

Goals

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.

Expected Results

The user is only allowed to crop the image with a square aspect ratio. Also after pressing undo.

Actual Results

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.

Steps to Reproduce

Configure crop view controller to only allow square aspect ratio:

let cropViewController = TOCropViewController(image: pickedImage)
cropViewController.aspectRatioLockEnabled = true
cropViewController.aspectRatioPickerButtonHidden = true
cropViewController.aspectRatioPreset = .presetSquare
  • Play with the crop selection
  • Press undo
  • Now the crop selection is no longer locked to a square aspect ratio
@funkenstrahlen
Copy link
Author

I just realised this can be fixed by setting

cropViewController.resetAspectRatioEnabled = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant