TOCropViewController
TOCropViewController copied to clipboard
[Question] How to change cropping square size
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)

@TimOliver
I use cropvc.cropView.cropViewPadding. It make cropping square small, but ratio changes....
Dragging and change and change ratio.
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.
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!