UIButton delayed state change

后端 未结 5 1713
庸人自扰
庸人自扰 2020-12-31 03:31

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 f

5条回答
  •  情歌与酒
    2020-12-31 04:07

    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.

提交回复
热议问题