Search code examples
iphoneiosmapkitmkmapviewcore-location

Making the MKMapView transparent but keeping overlays opaque


Is there a way to make the map somewhat transparent but keep all the added overlays opaque? Adjusting the alpha for the map will of course set it for the overlays as well.


Solution

  • You would have to fiddle around with MKMapView's subviews which is possible but completely undocumented and not recommended by Apple. Basically you'd need to find the subview with the actual map and set its alpha. No guarantee it'll actually work!