How to Crop image in Circle Shape with Grid inside Circle

一笑奈何 提交于 2019-12-31 03:05:35

问题


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.



来源:https://stackoverflow.com/questions/53248609/how-to-crop-image-in-circle-shape-with-grid-inside-circle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!