0

I have a UIImageView that houses the picture of a floorplan. On top of that I have a UIView where I would like to draw custom shapes (semi-transparently) over different rooms on the floor plan.

I read about UIBeizerPaths for drawing custom shapes, but wasn't able to find out if I could then fill the shape I had drawn.

Summary:

1) Can I fill shapes with color that are drawn from UIBeizerPaths?

2) IF yes, can it be semi-transparent?

3) Are there any alternatives?

BloonsTowerDefence
  • 1,184
  • 2
  • 18
  • 43

1 Answers1

0

Basically, you want to:

  1. Override drawRect (see for example this question)
  2. Call CGContextDrawPath (see the API here)

And yes, you should be able to use a semi-transparent color.

Community
  • 1
  • 1
Russell Zahniser
  • 16,188
  • 39
  • 30