First of all - big thanks for such a great library. This is one of my favorites.
pod update
before filing this issue.Which version of the library were you using? 2.1.0
Which version of iOS are you running? iOS 11.1
What model of iOS device were you testing on? iPhone 7/6s, Simulator
If using CocoaPods, which version of CocoaPods are you on? 1.3.1
I'm trying to hide rotation button using library's public API.
Rotation button (http://joxi.ru/12MZwqYU4W7EjA) is hidden.
Rotation button present without respect to API calls.
Run crop controller as follows:
let croppingStyle: TOCropViewCroppingStyle = preset == .circular ? .circular : .default
let cropController = TOCropViewController(croppingStyle: croppingStyle, image: image)
cropController.delegate = self
cropController.customAspectRatio = CGSize(width: 5, height: 10)
cropController.rotateClockwiseButtonHidden = true // this one
cropController.rotateButtonsHidden = true // and this one do nothing
cropController.aspectRatioLockEnabled = true
cropController.resetAspectRatioEnabled = false
Hi @freaqed! Thanks for the thorough report! I'm glad you found this framework useful.
I just tested it myself and it seemed fine to me.
We're on version 2.3.4 of the library now, can you try pulling the latest version and trying to see if that fixes it?
Thanks a lot!
Thanks for such a fast response!
Just checked v. 2.2 - result is the same.
I've created a clean project which reproduces an issue - https://www.dropbox.com/s/p5y7hi329tonvmg/TestCropTool.zip?dl=0
And result I've got from running test project - http://joxi.ru/DmBz9OLUNp8agm
Suppose this button (in a red frame) shouldn't be there.
Oh wow. Okay. Not great.
I think the reason it was a bug was because the controller was being really conservative with setting up the rotation buttons, so there was a logic glitch where one was created, but then the command to hide it wasn't getting through.
I just made the whole logic a lot more simple. Try pulling straight from master
now, and only setting cropController.rotateButtonsHidden = true
. It SHOULD work now. :)
Now it works like a charm!
Thanks, @TimOliver!
Most helpful comment
Now it works like a charm!
Thanks, @TimOliver!