ios 8 - buttons in horizontal scroll view intercepting pan event - scroll does not work

后端 未结 5 1241
刺人心
刺人心 2020-11-28 06:28

I have a horizontal scroll view with a line of buttons. The scroll view will not scroll unless I do an extremely fast swipe.

If I set the buttons to userInteractionE

5条回答
  •  难免孤独
    2020-11-28 06:35

    I found that in iOS 8, the UIScrollView's underlying UIPanGestureRecognizer is not respecting the UIScrollView's delaysContentTouches property. I consider this an iOS 8 bug. Here's my workaround:

    theScrollView.panGestureRecognizer.delaysTouchesBegan = theScrollView.delaysContentTouches
    

提交回复
热议问题