0

I have a UIScrollView which has a bunch of UIButtons as children.

If I click outside of these buttons, I am able to scroll the UIScrollView. However, if I try to scroll by clicking on one of these buttons, the scrollview doesn't work.

Each button is registered to listen to UIControlEventTouchUpInside.

Any ideas?

EXC_BAD_ACCESS
  • 346
  • 1
  • 4
  • 19
xjq233p_1
  • 7,810
  • 11
  • 61
  • 107
  • You have a tricky case, but I think you can find your answer in [this useful question][1]. [1]: http://stackoverflow.com/questions/11485100/allow-uiscrollview-and-its-subviews-to-both-respond-to-a-touch – WolfLink Mar 01 '13 at 03:32

1 Answers1

0

If you're touching the button and hoping to scroll, then you should be linking to the UIControlEventTouchDownInside event, not outside!

Additionally, you have to pass the touch event to the underlying UIScrollView to make the scrolling happen. The app is actually trying to do you a favor by letting you click the button and not scrolling the table.

Good luck

Nick Esposito
  • 395
  • 2
  • 6