1

我有一个自定义 UItableviewcell (我已将其子类化)。我必须在选择时更改它的选择样式,并在选择其他单元格时恢复更改。我有一个回调 setSelectionStyle ,我可以在其中更改外观以显示其被选中,但我没有回调来恢复该更改。

任何想法苹果如何从 UItableviewcell 中删除蓝色的选择层?

4

1 回答 1

2
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {


   /*

     All required implementation with the selected row 

   */

    // Use the following code to deselect the row.
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

注意:不要忘记在 .m 文件中添加 tableview 委托。

于 2012-08-22T23:34:06.857 回答