0

In my app there is UIScrollViewer(uiimageview inside this), when the userinteractionenabled=true, then no touch event fires in the app. How can i enable the touch events with userinteractionenabled=true.

I have tried using UITapGestureRecognizer, it works fine. But normally I am attaching an event to a button inside the touchesBegan event, as now i have applied the UITapGestureRecognizer, then in this I just do the things that needs to be done in touchesBegan event, but now click event of a button does not fire. I need to get these events in my app.

Please help me!

Mandeep Kaur
  • 183
  • 4
  • 17

2 Answers2

1

Since your image view is on top of scrollview touchesBegan will not have the desired effect. The scrollview swallows all touches. It has nothing to do with userinteractionenabled.

To make the subview of scrollview to get touch you will have to pass touch yourself. Have a Look at this answer.

Community
  • 1
  • 1
Vignesh
  • 10,205
  • 2
  • 35
  • 73
  • touchesBegan event has all the effects if i apply userinteractionenabled=false, but does not respond when userinteractionenabled=true.. – Mandeep Kaur Mar 05 '12 at 07:47
  • @MandeepKaur. I answered your question. When your scrollview is enabled it swallows all touch. – Vignesh Mar 05 '12 at 09:25
0

Maube you need tabContent.multipleTouchEnabled = YES?

Padavan
  • 1,056
  • 1
  • 11
  • 32