UIImage masking problems iOS 7

前端 未结 3 1350
暗喜
暗喜 2021-02-06 19:23

I have heavily borrowed (standard) code which applies a grayscale UIImage mask to a UIImage.

- (void) maskImage:(UIImage *)image withMask:(UIImage *)maskImage {         


        
3条回答
  •  旧巷少年郎
    2021-02-06 19:24

    Make sure that both images (the image to be masked and the mask itself) have an alpha channel! This solved the issue for me on iOS7.

    Then you should be able to use the old code you have used for iOS6.

提交回复
热议问题