Programmatically Show Call Out on Annotation
- (void)mapView:(MKMapView *)mymapView didAddAnnotationViews:(NSArray *)views
{
//Show call out
[mapView selectAnnotation:[[mapView annotations] lastObject] animated:YES];
}
Labels:
annotation,
iphone SDK,
mapview
Bring MKAnnotation to Front
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
for (MKAnnotationView * annView in views) {
MapAnnotation* mapAnnotation = (MapAnnotation *)[annView annotation];
if([mapAnnotation.type isEqualToString:@"Call Out"])
{
[[annView superview] bringSubviewToFront:annView];
break;
}
}
}
Labels:
annotation,
iphone SDK,
mapview,
MKAnnotation,
top
Subscribe to:
Posts (Atom)