I have UIScrollView
loaded with UIButtons
and on UIButton
action I have highlighted UIImage
of each UIButton
.
If I don't set delaysContentTouches
as NO
then highlighted UIImage
of UIButton
will not shown if I touch up UIButton
very fast. After I set delaysContentTouches
property as NO
then only UIButton
highlighted UIImage
is shown.
Now after setting delaysContentTouches
property as NO for UIScrollView
. I can not scroll my UIScrollView
by dragging on the UIButtons
. Now how can I resolve this issue.
Please give me an advise.
Thanks in advance.
Here's what works for me. Subclass UIScrollView, and implement only this method:
Then set
delaysContentTouches = NO;
Voila! Works just like the home screen: Highlights buttons immediately, but still allows scrolling :)
OK I have resolved by implementing below method :
Unable to find a satisfactory solution online so far (and it seems to be that Apple is ignoring the issue). Found a thread on Apple's developer forum with some suggestions in there that may help: UIScrollView: 'delaysContentTouches' ignored
I was able to use the workaround from this link. To summarize the workaround (I'm para-quoting here):
Here's my code:
I had same issue & same hierarchy of the views, With latest sdk , just use it :
Setting delaysContentTouches to NO for UIButton in the same UITableViewCell.
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: