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