UITableView 多选

-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{

        returnUITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;

}

 

控制 已经选择的不能取消,可以在以下callfunction中在选上

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

{

    if (!hasPermissionEditTopic) {

        for (int i=0; i<selectedVec.size(); ++i) {

            if (selectedVec[i]==[indexPath row]) {

                [self.workGroupTableViewselectRowAtIndexPath:indexPath animated:YESscrollPosition:UITableViewScrollPositionTop];

            }

        }

        

    }

  

原文地址:https://www.cnblogs.com/anjsxz/p/3725568.html