I've added several other annotation views to my map view.
All annotation views within the MKMapView annotations array are in somewhat random order. This may cause some annotation views to be overlapped by the polyline view.
Here's a solution. Would you be so kind and incorporate this in your example.
Add this to your view controller, which serves as your MKMapViewDelegate:
# pragma mark -
# pragma mark - MKMapViewDelegate
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
for (int i=0; i<[views count]; i++) {
MKAnnotationView *view = [views objectAtIndex:i];
if ([view isKindOfClass:[NVPolylineAnnotationView class]]) {
[[view superview] sendSubviewToBack:view];
}
}
}
I've added several other annotation views to my map view.
All annotation views within the MKMapView annotations array are in somewhat random order. This may cause some annotation views to be overlapped by the polyline view.
Here's a solution. Would you be so kind and incorporate this in your example.
Add this to your view controller, which serves as your MKMapViewDelegate: