Swift 3 version of the answer firstresponder :
let userPoint = MKMapPointForCoordinate(mapView.userLocation.coordinate) let mapRect = mapView.visibleMapRect let inside = MKMapRectContainsPoint(mapRect, userPoint)
Pretty much the same thing. This API has not yet been Swift-ified (i.e., updated in accordance with the Swift API development guidelines). It really has to be ...
let userPoint = mapView.userLocation.coordinate.mapPoint let inside = mapView.visibleMapRect.contains(userPoint)
Scott gardner
source share