Drawing a line over a scrollable image Problem!
In my iPhone App, I want to display two components:
A scrollable image in one of the Views. I do this with
UIScrollableView
withUIImageView
inside it.A line should be开发者_StackOverflow drawn in the view over a part of the image. I do this by using a subclass of
UIView
and drawing a line inside thedrawRect()
method.
The problem is if I put the Line View over the Image View, then the image won't be scrollable since it will not receive the user's touch events.
On the other hand, if I put the Line View behind the Image View, then the line won't be visible to the user.
Any idea how can I achieve both?
Try this, Put the Line View behind the Image View, then set the imageview as opaque.
精彩评论