如何使用圆内网格裁剪圆形图像
How to Crop image in Circle Shape with Grid inside Circle
在我的社交媒体应用程序中,我想要图像裁剪功能,圆形裁剪图像加上圆内有网格。
我已经检查过 TOCropViewController.but 没有网格选项。
https://github.com/TimOliver/TOCropViewController
在裁剪视图顶部添加 CAShapeLayer
,并在该形状图层中添加网格线。
我找到一个解决办法,我们可以在CropView中使用UIGraphicsGetCurrentContext,在CropView中使用addEllipse方法绘制Circle。
这是 link 的解决方案。
https://github.com/bhaveshbc/CircleCropView
在我的社交媒体应用程序中,我想要图像裁剪功能,圆形裁剪图像加上圆内有网格。
我已经检查过 TOCropViewController.but 没有网格选项。 https://github.com/TimOliver/TOCropViewController
在裁剪视图顶部添加 CAShapeLayer
,并在该形状图层中添加网格线。
我找到一个解决办法,我们可以在CropView中使用UIGraphicsGetCurrentContext,在CropView中使用addEllipse方法绘制Circle。
这是 link 的解决方案。 https://github.com/bhaveshbc/CircleCropView