2
A
回答
7
實施editingStyleForRowAtIndexPath和該行返回UITableViewCellEditingStyleNone:
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == sss && indexPath.row == rrr)
return UITableViewCellEditingStyleNone;
else
return UITableViewCellEditingStyleDelete;
}
2
接受的響應作品,但不這樣做的正確方法。有兩種方法:editingStyleForRowAtIndexPath
和canEditRowAtIndexPath
editingStyleForRowAtIndexPath:使用時,有在表
canEditRowAtIndexPath多種不同的編輯風格:使用時,一些行應該編輯和一些不應該。
因此實現你的表委託正確的做法是:
- (BOOL)tableView:(UITableView *)tableView
canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == sss && indexPath.row == rrr)
{
return NO;
}
return YES;
}
相關問題
- 1. 防止刪除
- 2. 防止文件刪除
- 3. 防止刪除雙引號
- 4. MySQL:如何防止刪除?
- 5. 防止刪除實體
- 6. 防止unlist刪除空值
- 7. 防止刪除列在MySQL
- 8. 如何防止刪除NULLS?
- 9. 防止意外刪除
- 10. 防止eclipse刪除空白
- 11. 防止從viewForHeaderInSection滾動UITableViewCell
- 12. 防止UITableView重用UITableViewCell?
- 13. 刪除圓角UITableViewCell
- 14. NSException當刪除UITableViewCell
- 15. CONTENTEDITABLE:防止內部元件被刪除
- 16. 防止特定ID的刪除
- 17. Memcached - 如何防止項目被刪除
- 18. 防止從BigCommerce API中意外刪除
- 19. 防止用戶刪除在TFS
- 20. jquery防止刪除每個表格行
- 21. 如何防止Installshield刪除文件?
- 22. 防止刪除特定記錄
- 23. 防止在Laravel上級聯刪除
- 24. IValueConverter塊可以防止刪除
- 25. 已啓用jquery防止後刪除?
- 26. 如何防止用戶刪除記錄
- 27. 防止文件被刪除和更改
- 28. 防止刪除列數減少
- 29. 哪種關係可以防止刪除?
- 30. 防止SharePoint列表項刪除
這就是我認爲這將是......非常感謝您的回答! – Pripyat 2010-05-10 21:14:12