2
我有一個包含多個部分的UITableView。當我將表格設置爲編輯模式時,我更喜歡一個部分(僅包含1行)不顯示編輯符號,也不會調用tableView:commitEditingStyle:forRowAtIndexPath :.
這可能嗎?
問候 約翰允許在uitableview中進行編輯,但不能在一行中編輯
我有一個包含多個部分的UITableView。當我將表格設置爲編輯模式時,我更喜歡一個部分(僅包含1行)不顯示編輯符號,也不會調用tableView:commitEditingStyle:forRowAtIndexPath :.
這可能嗎?
問候 約翰允許在uitableview中進行編輯,但不能在一行中編輯
在這裏,我承擔部分1和行0不能非常編輯
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
if (indexPath.section == 1) {
if (indexPath.row == 0) {
return NO;
}
}
return YES;
}
感謝。這正是我需要的。約翰 – jread1297
歡迎................ –