UIButton delayed state change

后端 未结 5 1738
庸人自扰
庸人自扰 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 03:59

    The problem is that your UIButton is inside a UITableView. This means that the table view has to determine whether your tap is going to be a swipe or if it's just a tap intended for the button. The table view has to delay sending a message to the UIButton until it knows that the user doesn't intend to swipe and therefore scroll the view instead of pressing the button.

    If you don't need a table view, get rid of the UITableView.

提交回复
热议问题