I was wondering if someone could point me in the right direction with this problem.
I have a user-created UIBezierPath with several points that have come about by user touches.
I can get these to create shapes on a bog-standard UIView by using the [myPath fill]; function.
What I would ideally like to do is to use the path to create a clipping mask for a UIImage – perhaps as a UiImageView?
I tried changing my UIView to a UIImageView and then changing the function to [myPath addClip]; but for some reason it does not work.
You need to create a graphics context, draw your image, and draw your mask using kCGBlendModeDestinationIn. Something like this: