草庐IT

proposedDestinationIndexPath

全部标签

ios - 如何在重新排序期间更新 UITableViewCell

在拖动UITableViewCell时,委托(delegate)方法-(NSIndexPath*)tableView:(UITableView*)tableViewtargetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath*)sourceIndexPathtoProposedIndexPath:(NSIndexPath*)proposedDestinationIndexPath被调用。在此委托(delegate)方法中,我可以根据所选单元格的proposedDestinationIndexPath设置属性。我现在的问题是如何在移动过程中更

ios - 阻止在 TableView 的特定单元格中重新排序

我想阻止要重新排序的单元格。例如:我有一个包含4行的TableView,但不希望第一个单元格可以重新排序。这可能吗?我试过使用:if(indexPath.row==0){[cellsetEditing:NOanimated:NO];}但不起作用。谢谢。 最佳答案 我找到了答案!您可以使用UITableViewDelegate中的方法targetIndexPathForMoveFromRowAtIndexPath。-(NSIndexPath*)tableView:(UITableView*)tableViewtargetIndexPa