2011-02-09 22 views

回答

10

落实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; 
} 
+1

这不会帮助我。谢谢。 – AechoLiu 2011-04-13 03:20:07

相关问题