Masking and Reverse Masking in Imageview ios

后端 未结 1 1044
离开以前
离开以前 2021-01-06 20:56

I have one Imageview that contains the Image . And one Mask Shape that contains shape of rabbit. I have one code that gives the below result.

- (UIImage*)myn         


        
1条回答
  •  甜味超标
    2021-01-06 21:34

    You should look through blendMode. Try smth like this:

    [rabbitImage drawInRect:rect
                  blendMode:kCGBlendModeDestinationOut
                    alpha:1.0];
    

    0 讨论(0)
提交回复
热议问题