Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.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 是否可以在子视图中而不是在父视图中调用touchesBegind、touchesMoved和toucheSend?_Ios_Objective C_Uitableview_Uipopovercontroller - Fatal编程技术网

Ios 是否可以在子视图中而不是在父视图中调用touchesBegind、touchesMoved和toucheSend?

Ios 是否可以在子视图中而不是在父视图中调用touchesBegind、touchesMoved和toucheSend?,ios,objective-c,uitableview,uipopovercontroller,Ios,Objective C,Uitableview,Uipopovercontroller,我的问题是触摸开始、触摸移动和触摸结束的焦点是: - (void)didSelectWithTableView:(UITableView *)tableView controller:(UIViewController *)controller { ... } 在表格视图中,单击。所以didSelectWithTableView从未被调用 是否可能有一个子视图(在popover中)由touchesBegind、touchesMoved和toucheSend处理,而不是父视图处理?只需调用这些方

我的问题是触摸开始、触摸移动和触摸结束的焦点是:

- (void)didSelectWithTableView:(UITableView *)tableView controller:(UIViewController *)controller
{
...
}
在表格视图中,单击。所以didSelectWithTableView从未被调用


是否可能有一个子视图(在popover中)由touchesBegind、touchesMoved和toucheSend处理,而不是父视图处理?

只需调用这些方法的超级实现即可。以及您的覆盖代码

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [super touchesBegan:touches withEvent:event];
    ...
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    [super touchesMoved:touches withEvent:event];
    ...
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    [super touchesEnded:touches withEvent:event];
    ...
}

伙计,这就是重点。现在我的下一个问题,如果你能帮我的话,就是那张票。。。我尝试在弹出框的子视图中使用这三种方法(touchebegan、moved和ended)。。。