Last active
February 7, 2017 13:29
-
-
Save fmo91/fda881628190e880f17de35a5ceea785 to your computer and use it in GitHub Desktop.
Sample use for rendererForOverlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer { | |
// This is the final step. This code can be copied and pasted into your project | |
// without thinking on it so much. It simply instantiates a MKTileOverlayRenderer | |
// for displaying the tile overlay. | |
if let tileOverlay = overlay as? MKTileOverlay { | |
return MKTileOverlayRenderer(tileOverlay: tileOverlay) | |
} else { | |
return MKOverlayRenderer(overlay: overlay) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment