Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 其他视图中的基本拖放uitableview单元格_Ios_Drag And Drop - Fatal编程技术网

Ios 其他视图中的基本拖放uitableview单元格

Ios 其他视图中的基本拖放uitableview单元格,ios,drag-and-drop,Ios,Drag And Drop,我只想在任何uiview中拖动tableview,然后调用一个web服务。 请帮帮我。如果可能的话,我想通过长按tableview来启用拖动 in table view UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:cell action:nil]; longPress.delegate = self; [

我只想在任何uiview中拖动tableview,然后调用一个web服务。 请帮帮我。如果可能的话,我想通过长按tableview来启用拖动

in table view
        UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:cell action:nil];
        longPress.delegate = self;
        [cell addGestureRecognizer:longPress];



- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
    if([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]){
        [gestureRecognizer addTarget:self action:@selector(longGestureAction:)];
    }
    return YES;
}

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
    return YES;
}

-(void)longGestureAction:(UILongPressGestureRecognizer *)gesture{
    UITableViewCell *cell= (UITableViewCell *)[gesture view];

   }

到目前为止你试过什么吗?Stackoverflow旨在帮助您解决特定问题,而不是为您开发应用程序。请给出基本解决方案我应该从哪里开始,我应该使用什么UILongPressGestureRecognitizer*longPress=[[UILongPressGestureRecognitizer alloc]initWithTarget:cell action:nil];longPress.delegate=self;[单元格地址识别器:longPress];有一个教程演示如何从一个表视图中的单元格拖动到另一个表视图。看起来它提供了一些类似于您希望在这里实现的功能。