How to Crop image in Circle Shape with Grid inside

2019-02-27 08:48发布

问题:

In my Social media app i want image Cropping Functionality, that Crop image in Circle shape plus have Grid inside Circle.

I have Already Checked TOCropViewController.but there is no option for Grid. https://github.com/TimOliver/TOCropViewController

回答1:

I find one solution , we can use UIGraphicsGetCurrentContext in CropView and use addEllipse method to draw Circle inside CropView.

this is link For Solution. https://github.com/bhaveshbc/CircleCropView



回答2:

Add a CAShapeLayer on top of your cropping view, and add the grid lines in that shape layer.