Iphone Don';不允许将单元格移动到另一部分
如何禁用用户可以将单元格移动到其他分区?我不想每次都显示警报;)Iphone Don';不允许将单元格移动到另一部分,iphone,uitableview,Iphone,Uitableview,如何禁用用户可以将单元格移动到其他分区?我不想每次都显示警报;) 谢谢:D实现targetIndexPathFormovfromRowAtIndexPath委托方法: - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath
谢谢:D实现targetIndexPathFormovfromRowAtIndexPath委托方法:
- (NSIndexPath *)tableView:(UITableView *)tableView
targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath
toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath
{
if (proposedDestinationIndexPath.section != sourceIndexPath.section)
{
//keep cell where it was...
return sourceIndexPath;
}
//ok to move cell to proposed path...
return proposedDestinationIndexPath;
}
这确实对我有帮助。非常感谢。