Iphone – UIButton delayed state change


I have a UIButton subview inside of a UITableViewCell.

When this button is touched, the user must hold the button for about a half second for the button's image to change to the UIControlStateHighlighted image.

This means that if the user just taps the button as is usually the case, the highlighted state is never shown.

Why does this occur and how can I fix it?

Best Solution

I just encountered this problem and saw that this issue hadn't been closed. After screwing around for a while I found a fix for it.

Now you can fix this by turning off delaysContentTouches or unchecking the "Delays content touches" box on the tableview.

The only negative side effect is that the user won't be able to tap down on a button and initiate a scrolling gesture. However, if the user tries to scroll starting from anywhere that doesn't itself accept touches, the behavior should be the same as before.

Related Question