2011-02-09 52 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

相關問題