I was working on some button animation attached to events like UIControlEventTouchDown and UIControlEventTouchUpInside. When pressing a UIButton those events were supposed to animate the button to shrink and grow. However, the user would have to hold the button for about a half a second before they saw the animation start. It turns out there is a reason and solution for this.
My UIButton was in a UIScrollView. UIScrollView has a property called delaysContentTouches so that if a user touches anywhere within the UIScrollView (or UITableView) touches are delayed in case the user wants to scroll the UITableView or UIScrollView. So all you have to do is set the delaysContentTouches to NO.
The drawback is if a user touches the button and wants to scroll they can't. But that's fine, because the user really shouldn't try to scroll by putting their finger on a button.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment