TOCropViewController
TOCropViewController copied to clipboard
Crash when double tap done button
Describe the bug Application crash when we done cropping and repeat tap done button before library done the cropping process.
To Reproduce Steps to reproduce the behavior:
- Show TOCropViewController
- Process edit picture / cropping
- Quickly repeat tap done button in the bottom right
- See error:
cropViewController:didCropToImage
CropViewController was compiled with optimization - stepping may behave oddly; variables may not be available.
https://i.ibb.co/nCxkVvJ/Screen-Shot-2563-06-08-at-14-02-15.png
Expected behavior Library done the cropping process and return the cropped image.
iOS Device:
- Device: iPhone7Plus
- OS: iOS13.3.1
- Library Version: 2.5.2
Hi @Amefuri! Thanks for reporting this bug!
Hmm, that's interesting. I wonder if that dispatch delay is causing an issue.
Maybe if you can, try commenting out the dispatch_after line (And the subsequent }); one too) and see if that fixes it!
I'll try and look at it when I get the chance, but if you can try diagnosing the problem for your own use case, that would help a lot. :)
Thanks!