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
  • 54,118
  • 18
  • 85
  • 86
adam
  • 22,064
  • 20
  • 85
  • 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,354
  • 1
  • 23
  • 36