0

In my drawRect method I draw a UIImage, eg

[[UIImage imageNamed:@"shape.png"] drawInRect:CGRectMake(50,50,50,50)];

I want to be able to clip multiple shapes out of the shape so the background of the view is shown. I can't seem to get the quartz clipping methods to behave as I want.

Can anyone help push me in the right direction?

Thanks!

Cezar
  • 55,636
  • 19
  • 86
  • 87
adam
  • 22,404
  • 20
  • 87
  • 119

1 Answers1

0

I think what you are wanting is to create a mask and apply that to a UIImage. Take a look here: Rounded corners question.

Community
  • 1
  • 1
Matthew Leffler
  • 1,386
  • 1
  • 19
  • 36