Objective c UITableView像Clear应用程序一样重新排序

Objective c UITableView像Clear应用程序一样重新排序,objective-c,ios,uitableview,Objective C,Ios,Uitableview,长点击检测后如何开始移动?使用UILongPressGestureRecognitor进行长点击检测。 我的代码: 断绝联系。谢谢。cocoacontrols.com上有一个控件,模仿Clear应用程序。显然,它仍在开发中,但当我下载它时,它仍然令人印象深刻。你可以将其完全整合到你的应用程序中,也可以将其作为你自己研究的起点 .谢谢!非常感谢。非常感谢。如果有帮助的话,如果你接受答案和/或给我打分,那就太好了!有一点是肯定的,那就是如果你的接受率很低,有些人会推迟花时间为你制定答案:-/ `-

长点击检测后如何开始移动?使用UILongPressGestureRecognitor进行长点击检测。 我的代码:


断绝联系。谢谢。

cocoacontrols.com上有一个控件,模仿Clear应用程序。显然,它仍在开发中,但当我下载它时,它仍然令人印象深刻。你可以将其完全整合到你的应用程序中,也可以将其作为你自己研究的起点


.

谢谢!非常感谢。非常感谢。如果有帮助的话,如果你接受答案和/或给我打分,那就太好了!有一点是肯定的,那就是如果你的接受率很低,有些人会推迟花时间为你制定答案:-/
`- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    flMoveRow = NO;
    [self setEditing:YES animated:YES];
    [listView reloadData];
}


- (void)longTapGesture:(UILongPressGestureRecognizer *)sender{
    if((sender.state != UIGestureRecognizerStateEnded)&&(!flMoveRow)){
        NSLog(@"==longTapGesture:");
        flMoveRow = YES;  
        [listView beginUpdates];
        NSArray *indexPaths = [[NSArray alloc] initWithObjects:indexPath, nil];
        [listView reloadRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone];
        [listView endUpdates];
        sender.enabled = NO;
    return;    
}

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"==canMoveRowAtIndexPath:%i -- %d", indexPath.row, (int)flMoveRow);
return flMoveRow;}`