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.73k stars 951 forks source link

Feature request: Move cropView itself, not the image behind #224

Closed daurenm closed 6 years ago

daurenm commented 6 years ago

Hardware / Software

Which version of the library were you using? CropViewController (2.3.4): Which version of iOS are you running? iOS 11.1.2 What model of iOS device were you testing on? iPhone 7 If using CocoaPods, which version of CocoaPods are you on? 1.3.1

Goals

What is the outcome result you want to achieve with this library?

Is it possible to change the pod, so that cropView moves itself, and not the image?

TimOliver commented 6 years ago

Hi! Erm, how do you mean exactly? You want the crop box to pan around instead of the image?

I don’t think it’s possible. The image is a sub view of a UIScrollView and the crop box isn’t, so it’d require a pretty fundamental shift in the layout ordering of the views and the logic handling it.

Sorry!

daurenm commented 6 years ago

Oh, I see.

But, what if we just disabled scrolling (or even use plain UIView instead of UIScrollView), so we can just move crop box around without extra focusing?

TimOliver commented 6 years ago

Oh yeah! You could do that! You'd have to disable the scroll view's scrolling and the timer logic that re-centres the image after touching the crop box. It might look a little strange, but that would work. :)

In any case, this is out of scope for this library, so I'm going to close this issue now. :)

Good luck!