1

I have a UIScrollView with another view behind it that has buttons. The buttons cannot be on the scroll view, they must be behind it. I am using the pointInside method to pass taps to the buttons view behind the scroll view if that is where the user is tapping. However, I don't want to pass the tap to the buttons view if the user is trying to drag/scroll. If that is the case I want it to scroll the scroll view instead of pass a tap to the buttons.

How can I accomplish this?

jer_francis
  • 153
  • 1
  • 11

1 Answers1

1

UIScrollView has a panGestureRecognizer property. Use the pan gesture's state to determine if you have to pass touches to your button or not.

Adrian
  • 16,233
  • 18
  • 112
  • 180
rounak
  • 9,217
  • 3
  • 42
  • 59