TimOliver / TOCropViewController

A view controller for iOS that allows users to crop portions of UIImage objects
http://www.timoliver.com.au/2015/06/21/tocropviewcontroller-an-open-source-image-cropper-for-ios/
MIT License
4.72k stars 944 forks source link

Implement it as a view not as VC #444

Open Coder-ACJHP opened 3 years ago

Coder-ACJHP commented 3 years ago

This amazing tool needs to support single view implementation. Consider if i want to use it with my custom UI design, if toolbar, navbar etc can be separated we can use it with our custom angel ruler, aspect chooser etc and show it on container view with custom size. In this case we forced to present it as a ViewController and as you know in some projects isn't acceptable. Thank you😊

AwaisFayyaz commented 3 years ago

I also encountered the same scenario. i don't want to present or push the TOCropViewController. instead i want to perform cropping in a specific view. is this possible with current version ?

TimOliver commented 3 years ago

Thanks for the feedback folks!

You can already separate it out if you need. All of the core cropping view logic is contained in the TOCropView class, which you can instantiate and control completely separate from the TOCropViewController class.

Apps like Mercari already implement the cropper in this way.

Is there anything in particular blocking you from doing the same?