###設置TableView能夠多行選擇,這裏有2中方法能夠實現代理
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { // 1.實現這一個代理方法,返回2個值 return UITableViewCellEditingStyleDelete| UITableViewCellEditingStyleInsert; }
self.tableView.allowsMultipleSelectionDuringEditing = YES;
這樣,當TableView進入編輯模式的時候就會顯示爲多選模式。code
###PS: 另外能夠自定義選中時「對號」的顏色,代碼以下:ip
self.tableView.tintColor = [UIColor redColor];