I have an MKMapView and another UIView subclass that is overlaid on top of the map. The custom view is transparent (I use it to overlay an inner shadow around the edge of the map). Now when I drop a pin on the map view a small black square shows up over the pin. It seems to disappear and change size randomly too. I can’t take a screenshot of it because for some reason it doesn’t appear in screenshots. I know it’s related to the custom view that’s overlaid on the map because when I remove it everything works fine.
Any ideas?
EDIT: As requested here’s the screenshot

and the code for the shadow overlay view:
self.layer.cornerRadius = 8.0f;
self.layer.borderColor = [UIColor colorWithWhite:0.8f alpha:0.6f].CGColor;
self.layer.borderWidth = 1.0f;
self.layer.masksToBounds = YES;
self.clipsToBounds = YES;
self.layer.shadowOffset = CGSizeMake(0, 1);
self.layer.shadowRadius = 5;
self.layer.shadowOpacity = 1.0;
I place the shadow overlay view in IB and that code is in the drawRect method of the view subclass.
Put your non-clipped shadow view inside another view with clipping on, this will clip the shadow on the outside of the box.