Recognize gestures behind a transparent UITableView

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

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

MKMapView is behind a UITableView. UITableView with positive content offset and clear background.

UITableView is currently accepting a gesture and the map cannot be started. How can I show a table view that should scroll only when cells are closed.

+4
source share
1 answer

If you can, change the frame of the table so that it just does not appear above the map.

If you cannot, subclass the table view and implement hitTest: to decide whether user interaction should be handled as a table or not.

+3
source

Source: https://habr.com/ru/post/1491654/


All Articles