【发布时间】:2015-11-16 07:28:34
【问题描述】:
我的 tableviewcell 在选中时具有灰色背景色。但是,我实际上并没有使用 tableview 的“选择”功能,我只是想要悬停效果,因此我在选择后立即取消选择该行,如下所示:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
tableView.deselectRowAtIndexPath(indexPath, animated: true)
}
问题是,灰色背景仅在我点击单元格的时间更长时才会显示。如果我快速点击单元格,我看不到灰色背景。
有什么方法可以实现吗?
谢谢。
【问题讨论】:
标签: ios swift uitableview