UITableView separator line disappears when selecting cells in iOS7

后端 未结 24 2141
耶瑟儿~
耶瑟儿~ 2020-12-05 04:01

In my tableView I set a separator line between cells. I am allowing selection of multiple cells. Here\'s my code for setting selected cell background color:

         


        
24条回答
  •  悲&欢浪女
    2020-12-05 04:26

    in my case i was animating a row, so just i needed put some like this:

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
    [tableView beginUpdates];
    [tableView deselectRowAtIndexPath:indexPath animated:NO]; 
    //if you are doing any animation you have deselect the row here inside. 
    [tableView endUpdates];
    } 
    

提交回复
热议问题