views:

23

answers:

1

Hi!

I want to draw polylines over and image loaded in an UIImageView.

Can someone give me some tips on where to start?

Thank you

A: 

Hello !

To draw polygon you should use the drawRect method located in UIView subclass.

So 2 solutions :
1°) You subclass UIImageView and in drawRect you draw your image and draw your polylines then
2°) You have an UIImageView and on the top an UIView subclass where you draw your polylines

Drawing the polylines won't be a problem (you should find an answer on stack). (like here : http://stackoverflow.com/questions/1464133/polyines-on-iphone)

Vinzius
Problem is drawRect is not called when you subclass UIImageView. I added an UIView over it and used your method.
Jorge