需要点击时高亮一下,松开后,高亮消失,可在
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath
的末尾加上
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES];
也可以延时一段时间再消失高亮:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath
{
// Any other table management you need
...
// After one second, unselect the current row
[self performSelector:@selector(unselectCurrentRow)
withObject:nil afterDelay:1.0];
}