开发者

UIScrollView still receives scroll events underneath a UIButton

I have a full-screen UIButton to capture all touch events, so that the scrollView underneath doesn't scroll. However, for some reason, it's not working. Can someone tell me a way to create a view that will capture tap and swipe events so this won't happ开发者_如何学Cen?

Thanks!


I just worked it out... The view I was adding it to had a smaller frame than its parent view... So even though the button was big enough to fill the screen, if it's outside the frame rect it won't respond to any touch events.

:)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜