我有一个水平滚动视图,它是垂直滚动视图的子视图。看起来垂直滚动视图正在拦截所有用户交互。我希望能够水平滚动水平滚动视图。我该怎么做?
这是我的代码的一小段:
UIScrollView *scrollView2 = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 100)];
scrollView2.contentSize = CGSizeMake(self.view.bounds.size.width + 400, 100);
_scrollView.contentSize = CGSizeMake(self.view.width, 400);
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.height - 108)];
[self.view addSubview:_scrollView];
[_scrollView addSubview:scrollView2];