目前,我通过使用UITableViewSelectionStyleNone然后根据委托方法更改单元格的颜色来覆盖标准 UITableViewSelectionStyle:
- (void)tableView:(UITableView *)tableView 
      didHighlightRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];                
    [cell setBackgroundColor:[UIColor yellowColor]];
}
- (void)tableView:(UITableView *)tableView 
    didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    [cell setBackgroundColor:[UIColor whiteColor]];
}
- (void)tableView:(UITableView *)tableView 
    didUnhighlightRowAtIndexPath:(NSIndexPath *)indexPath {
    NSLog(@"indexpath: %i",indexPath.row);
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    [cell setBackgroundColor:[UIColor whiteColor]];
}
- (void)tableView:(UITableView *)tableView 
    didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    [cell setBackgroundColor:[UIColor whiteColor]];
}
这几乎可以工作,除了每当我突出显示一个单元格然后将我的手指拖离它而不实际选择它时,颜色不会变为白色......如果我将它设置为 [UIColor RedColor] 它可以完美地工作。为什么是这样...
编辑:
不知何故,当我在 didUnhlightRowAtIndexPath 之后打印出 indexPath.row 时,我从我的 NSLog 中得到“indexpath:2147483647”
