TOCropViewController icon indicating copy to clipboard operation
TOCropViewController copied to clipboard

[Question] How to change cropping square size

Open sugitatestblue opened this issue 3 years ago • 3 comments

What are you trying to achieve with this library exactly? Please describe.

I want to change cropping square size.

I want to set square.

I tried these options. but never work.

cropvc.customAspectRatio = CGSize(width: 300, height: 300)
//                cropvc.cropView.frame = CGRect(x: 0, y: 0, width: 300, height: 300)
                
//                cropvc.imageCropFrame = CGRect(x: 0, y: 0, width: 300, height: 300)
//                cropvc.accessibilityFrame = CGRect(x: 0, y: 0, width: 300, height: 300)

change

sugitatestblue avatar Apr 25 '22 09:04 sugitatestblue

@TimOliver

I use cropvc.cropView.cropViewPadding. It make cropping square small, but ratio changes....

sugitatestblue avatar Apr 26 '22 01:04 sugitatestblue

Dragging and change and change ratio.

sugitatestblue avatar Apr 26 '22 02:04 sugitatestblue

Hi @sugitatestblue!

Hmm, what sort of feature are you building where you need the padding to be so big? If you set the aspect ratio to 1:1 and then update the padding values, maybe that will give you the effect you want here.

TimOliver avatar May 02 '22 08:05 TimOliver

Closing this out now. I feel like the best thing that can be done here is to file a PR to make the insetting of the crop box controllable externally. Thanks!

TimOliver avatar Apr 07 '24 03:04 TimOliver