[英]Is it possible to call the TouchesBegan, touchesMoved and touchesEnded in SubView, and not in parentView?
My problem is that the touchesBegan, touchesMoved and touchesEnded is taking the focus of : 我的问题是,touchesBegan,touchesMoved和touchesEnded正在关注:
- (void)didSelectWithTableView:(UITableView *)tableView controller:(UIViewController *)controller
{
...
}
in a tableview click. 在表格视图中单击。 So didSelectWithTableView is never called...
所以didSelectWithTableView永远不会被调用...
Is it possible to have a subView (in popover) that is handled by touchesBegan, touchesMoved and touchesEnded, but not the parent View ? 是否可以有一个由touchesBegan,touchesMoved和touchesEnded处理但不在父级View中处理的subView(在弹出窗口中)?
Just call the super implementation of the methods. 只需调用方法的超级实现即可。 Along with your override code.
以及您的替代代码。
- (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];
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.