4

In the view hierarchy, seen in the diagram below, I would like to be able to drag the portion of the map that can be seen through the clear UITableView (2).

--------------------------------
|1. MKMapView                  |
|   -------------------------------
|   |2. Clear UITableView      |  |
|   |   Content Offset         |  |
|   |                          |  |
|   |                          |  |
|   -------------------------------
|   |Cell                         |
|   -------------------------------
|   |Cell                         |
    -------------------------------

The MKMapView is behind a UITableView. The UITableView that has a positive content offset and a clear background.

At the moment the UITableView is taking the gesture and the map can not be panned. How can I tell the table view that is should only scroll when the cells are panned.

4

1 回答 1

3

如果可以,请更改表格视图的框架,使其不会放置在地图上。

如果你不能,子类化表格视图并实现hitTest:来决定用户交互是否应该由表格视图处理。

于 2013-07-16T17:17:17.670 回答