如何使UITableViewCells默认select编辑

在这里输入图像说明

在上面的屏幕截图中,我已经通过单击手动select了单元格,但是我希望默认情况下select所有单元格进行编辑。

你可以使用这个代码….

for(int i=0; i<[array count]; i++) { NSIndexPath *indexP = [NSIndexPath indexPathForRow:i inSection:0];  [tblView selectRowAtIndexPath:indexP animated:NO scrollPosition:UITableViewScrollPositionNone]; [self tableView:tblView didSelectRowAtIndexPath:indexP]; } 

在哪里tblView是你的tableView