开发者

Pressing on a button causes UIScrollView to scorll

开发者 https://www.devze.com 2023-01-13 12:12 出处:网络
I\'m having an inconsistent problem where sometimes I press on a button inside the scrollview. The scrollview catches the e开发者_开发问答vent and scrolls instead of the button getting the touch event

I'm having an inconsistent problem where sometimes I press on a button inside the scrollview. The scrollview catches the e开发者_开发问答vent and scrolls instead of the button getting the touch event. Any idea how to solve this bizarre behavior.

Thanks


Don't move your finger while it's pressed down on the button. If you move your finger at all, the scrollview will cancel the touches sent to the button and process them itself. It must do this so that you can scroll by touching anywhere on the scrollview, not just an empty space.

0

精彩评论

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

关注公众号