0

编辑:感谢所有试图提供帮助的人,我试图重用两个 UIScrollViews 来节省一些时间。但似乎 UIScrollView 方法不会为我节省任何时间,所以我完全手动编写视图。

我有两个 UIScrollView,一个只能水平滚动,一个只能垂直滚动,它们在屏幕的一部分重叠。

   -----
   | |
   | |
   | |
   | |
|--+---+----------|
| | 一个 | |
|--+---+----------|
   | |
   | |
   -----

我想要一个滚动视图来处理区域“A”中的水平滑动手势,另一个是垂直的,但我似乎无法让它工作。

有人对如何解决这个问题有任何想法吗?

4

2 回答 2

1

Would handling touchesBegan, touchesMoved and touchesEnded in the scroll view that is getting the touch events and manually calling them on the other scroll view work?

You could also scroll the other scroll view by handling the scroll view delegate in the scroll view getting the touches.

于 2013-06-14T15:32:45.873 回答
0

我有类似的问题。有 2 个UIScrollView彼此完全重叠,并且由于滚动另一个而需要滚动其中一个。

经过一段时间的搜索,我在这里找到了类似的帖子:

为我完成了这项工作:)

于 2014-04-02T14:42:30.367 回答