I am working on a iOS/Swift 4.0
app where I created a UITableView
, lets say tableView on a GMSMapView
, lets say mapView. Initially the tableView was not visible and after setting tableView.layer.zPosition = 2
, it was visible in front of the mapView. But gestures are not received by the tableView rather it was received by the mapView.
For example when I am trying to scroll the tableView, background mapView is moving/scrolling but the tableView is no. Also tableView(_:didSelectRowAt:)
is not called when I am selecting a cell. I have double checked the datasource
and delegate
is properly assigned and not being changed when reloading.
Things I have tried:
searchBar
state) using self.mapView.settings.setAllGesturesEnabled(true)
isScrollEnabled
, isUserInteractionEnabled
, allowsSelection
properties trueselectionStyle
to .default
, isUserInteractionEnabled
to trueStill cant fix the issue, any step I am missing?
The problem was in different side and i suggest anyone to look below steps
tableView
is front to mapView if it was created in xcode staticallytableView
is brought to front using self.view.bringSubview(toFront: tableView)
if its created programmaticallyisScrollEnabled, isUserInteractionEnabled, allowsSelection
properties