1. 程式人生 > >tableview didselect去除點選效果

tableview didselect去除點選效果

有兩個:

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

{

//    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

//    [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; (這種是沒有點選後的陰影效果)

    UITableViewCell *cell = [tableView cellForRowAtIndexPath

:indexPath];  

    cell.selected = NO;  (這種是點選的時候有效果,返回後效果消失)