I am trying to overlay a UIView on google GMSMapView. The goal is to intercept swipes to know when the map is moving manually. (I know that I can check -mapView: willMove: but this is caused regardless of whether the card moves programmatically or as a result of a manual touch). I will programmatically reorient the map as an updated position, because Google does not do this for you, like Apple. Like any software map, I want to stop centering the current position as soon as the user manually moves the map. The only way I could capture this event (without waiting for the transition to mapkit or waiting for Google to add to the API) is to capture a swipe when it passes the view above the map.
To clarify, my question is how do I view a Google map, make it respond to napkins and allow this event to go through GMSMapView?
Both my map and interceptView are children of the main view. interceptView has a gesureRecognizer set to opaque, not hidden, and userInteractionEnabled = YES. Thus, interceptView is great for touch events. But the map below does not move. If I set interceptView.userInteractionEnabled = NO, the map is working fine.
Touch-passing by overriding strokes and calling GMSMapView touchBegan does nothing. And overriding hitTest doesn't seem to be an option, because I cannot subclass GMSMapView. Has anyone done this? I know a lot about certain events here. I want to handle a specific event in two views, one of which is the Google map layer, which I cannot change the code.
source share