开发者

Drawing a line over a scrollable image Problem!

开发者 https://www.devze.com 2023-01-26 11:55 出处:网络
In my iPhone App, I want to display two components: A scrollable image in one of the Views. I do this with UIScrollableView with UIImageView inside it.

In my iPhone App, I want to display two components:

  • A scrollable image in one of the Views. I do this with UIScrollableView with UIImageView 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 the drawRect() 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消