1

How can i draw UIBezierPath on UIImageView? I have tried following code but when UIImageView's image is nil then I am only able to see the path, when I add the image this path is overlapped with the UIImageView's image. I want to draw the path above the UIImageVIew's image.

2
  • The image might be overwriting the context. Maybe have two imageviews? One for the image, and another on top for the line? Commented Jun 12, 2012 at 7:19
  • 1
    You didn't provide any reference to the code you had tried. Anyway - UIImageView is a beast of it's own (it will not call drawRect for example). You could for example add UIImageView to a UIView and another transparent UIVIew on top of it and draw the UIBezier path to the last one. Commented Jun 12, 2012 at 7:35

2 Answers 2

5

Yes you can draw bezierpaths in uiimageview by clling a draw method like DrawRect in uiview.

Sign up to request clarification or add additional context in comments.

Comments

0

Try adding a transparent UIView on top of your UIImageView. Make a UIView subclass for this transparent view. Override drawRect method in this subclass. stroke all the paths you want to draw.

Please get back to me if you want sample code for this.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.