Darken Map View when Annotation Clicked/Viewed
Is it possible开发者_运维知识库 to make the Mapview darken/decrease the alpha over a black background (similar to viewing images in a JS/CSS lightbox) when a annotation is clicked (which in turn shows a custom View over the lower portion of the map (in essence a small details box).
If anyone has done it, if a snippet / rough idea could be given that would be great.
If it's possible, would apple reject such design? I dont see why they would however its potentially decreasing the view of the google maps view temporarily...
Cheers.
You can use the delegate methods of MKMapViewDelegate to detect when the annotations are selected and deselected. When selected, like you said, decrease the alpha of the MKMapView over a black background to darken. Alternatively, increase the alpha of a black overlay thats on top of the MKMapView. When annotation is deselected you go back to normal. I don't think something like this would be rejected but no one can ever be 100% positive of Apple's approval decisions.
精彩评论