UITableViewCell中。如何在触摸期间突出显示单元格? [英] UITableViewCell. How do I just highlight cell during touch down?
本文介绍了UITableViewCell中。如何在触摸期间突出显示单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个自定义tableViewCell。我想通过突出显示来指示用户触地。单元格选择样式为 UITableViewCellSelectionStyleBlue
。在父控制器中,我设置了 self.clearsSelectionOnViewWillAppear = YES
。
I have a custom tableViewCell. I want to indicate user touch down by highlighting. The cell selection style is UITableViewCellSelectionStyleBlue
. In the parent controller I have set self.clearsSelectionOnViewWillAppear = YES
.
我应该好好去。不。选择仍然坚持细胞。我想要的只是在触地持续时间内的选择指示。外观应立即返回到未选中的外观上。
I should be good to go. Nope. Selection still sticks to the cell. What I want is selection indication only for the duration of the touch down. The appearance should immediately return to the unselected appearance on touch up.
我该怎么做?
干杯,
Doug
Cheers,
Doug
推荐答案
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
这篇关于UITableViewCell中。如何在触摸期间突出显示单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文