tags:

views:

451

answers:

2

Hi, I am having a problem in touchesMoved method in a view which is added on UIScroller view due to project specification. I added some number of labels which contains some text on each label and on swipping my finger on labels i have to play a specific file for that word.

If i just add the view on the window directly i got all touch events in touchesMoved without any problem, where as when i add my view on UIScrollerView and then add this to window there is some lag in touchesMoved method. I am not getting continuous touch points in touchesMoved as normal view. As a result while swapping the finger from the view it happens that some labels are missed or some times all are detected.

Is the problem is due scroll view as same code runs perfectly in normal condition(means without scroll view).

If any one have any solution to this i will be greatly thank full to you.

Regards, Vishal.

A: 

UIScrollView sets a timer on touchDown to be able to know if it should handle scrolling or if it should pass the events on to subviews.

There is a property on UIScrollView for controlling this behaviour:

@property(nonatomic) BOOL delaysContentTouches
monowerker
A: 

Hi monowerker,

Thanks for the reply. I tried this but still it has delay in detecting my finger touch in swipping the finger. Also it is blocking the scrolling of the view. Is there any other alternative.

Regards, Vishal.