容器视图接收触摸,而不是iPad上的子视图

我有一个UITableViewController在UIView里面触及iOS8(在iOS7中工作正常)的问题。

这是设置代码:

UITableViewController *tvc = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped]; tvc.tableView.userInteractionEnabled = YES; tvc.tableView.frame = CGRectMake(0, 0, self.incentivesContainerView.frame.size.width, self.incentivesContainerView.frame.size.height); [self addChildViewController:tvc]; self.incentivesContainerView.clipsToBounds = YES; [self.incentivesContainerView addSubview:tvc.view]; 

我有数据源和委托设置,一切工作正常与数据。 问题是这个incentiveContainerView似乎阻碍了对UITableViewController的触动。 我有一个问题的解决方法,添加一个手势识别器的容器:

 [self.incentivesContainerView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tappedSelectIncentivesView:)]]; 

哪些电话:

 - (void)tappedSelectIncentivesView:(UITapGestureRecognizer *)tap { CGPoint tapSpot = [tap locationInView:self.selectIncentivesVC.tableView]; [self.selectIncentivesVC tableView:self.selectIncentivesVC.tableView didSelectRowAtIndexPath:[self.selectIncentivesVC.tableView indexPathForRowAtPoint:tapSpot]]; } 

传递触摸事件,并正常工作。

不过,如果可能的话,我想要一个更清洁的方法,有没有更好的方法来做到这一点?

我发现这个post,看起来像我的问题,但我真的不愿意子类UIView: 如何使触摸事件影响视图的容器视图后面?

我在SO上发现了一些其他类似的post,但是对我来说并不是很有用,有什么build议吗?

谢谢!