I am trying to work on Google Map with some UIView. My requirement is : If I touch the MapView, one of UIView will disappear(animated) and it will remain disappear until I release the touch from MapView. I managed to disappear the UIView from screen on touching the MapView using the below code :
func mapView(_ mapView: GMSMapView, didLongPressAt
coordinate: CLLocationCoordinate2D) {
self.animate()
}
func mapView(_ mapView: GMSMapView,
idleAt position: GMSCameraPosition) {
self.collapse()
}
func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) {
//
}
func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
On dragging map and release { Touch --> Drag --> Lift } I can detect Finger Lift using idleAt. But I couldn't detect with anything if I { Touch --> hold --> Lift }. You can consider Uber or Ola app MapView for example
You can use GoogleMaps GMSMapViewDelegate:
This will call when Google map start moving and idle.