2011-02-09 11 views

risposta

10

Implementare il metodo targetIndexPathForMoveFromRowAtIndexPath delegato:

- (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

Questo mi aiuta. Grazie. – AechoLiu

Problemi correlati