小智 13
实现targetIndexPathForMoveFromRowAtIndexPath委托方法:
- (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;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
929 次 |
最近记录: |