开发者

cut part image from uiimageview

开发者 https://www.devze.com 2023-04-01 20:25 出处:网络
I have a quick question. I am trying to draw a shape on a picture and be abl开发者_开发知识库e to cut what is in the circle. Any ideas how I would go about doing that?You need to use core graphics fo

I have a quick question.

I am trying to draw a shape on a picture and be abl开发者_开发知识库e to cut what is in the circle. Any ideas how I would go about doing that?


You need to use core graphics for that. Create a mask with CGImageMaskCreate, and then use CGImageCreateWithMask to combine mask with the image.
Source and example: How to Mask an Image

0

精彩评论

暂无评论...
验证码 换一张
取 消