uitableview重新sorting不起作用,源始终等于目的地

我有一个tableview不会重新sorting。 它看起来像moveRowAtIndexPath永远不会调用与destinationIndexPath不同的sourceIndexPath。 当我拉一排时,它会跳回到起始位置,就好像这排不支持移动一样。

我试图实现所有的“canMove / canEdit /build议”方法返回YES,但我观察到相同的行为。 这是怎么回事?

- (void) tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath { NSLog(@"%d -> %d", [sourceIndexPath row], [destinationIndexPath row]); if ([sourceIndexPath row] == [destinationIndexPath row]) { return; } MyDomain *domain = [self getObject]; [domain.stuff exchangeObjectAtIndex:(NSUInteger) [sourceIndexPath row] withObjectAtIndex:(NSUInteger) [destinationIndexPath row]]; } 

我正在使用IIViewDeckController,它取消了视图中的平移。

设置ViewDeckController时,执行以下操作:self.panningCancelsTouchesInView = NO;