In iOS, only one MKPointAnnotation's callout can be displayed at a time. I would like to be able to show all of the pins' callouts on the screen at once. Any recommendations would be appreciated.
Asked
Active
Viewed 1,207 times
1 Answers
-1
Did you try this method of MKMapView Class:
- (void)addAnnotations:(NSArray *)annotations;
You should add all your MKAnnotation objects to an array and call the class method with the array.
Example:
NSMutableArray *filterLocs=[NSMutableArray array];
for (MKAnnotation *loc in YourMapPointsArray)
{
//add some condition here to manipulate your map points
[filterLocs addObject:loc];
}
[self.mapView addAnnotations:filterLocs];
or just make it plain
[self.mapView addAnnotations:YourMapPointsArray];

Satheesh
- 10,998
- 6
- 50
- 93
-
Yea, that's easy to implement. I'm trying to show all of the "callouts" of the annotation's at once. [eventMap selectAnnotation:point animated:YES]; -- for all of the annotations. The problem is that Apple only allows you to show one at a time. – user1530580 May 28 '13 at 04:33
-
I do this in my map and all annotation's appear at a time BTW I did not want any animation so that method was fine to me. – Satheesh May 28 '13 at 04:35
-
Could you give me an example? Not following. – user1530580 May 28 '13 at 04:36
-
That method is also not in the MKMapView class. – user1530580 May 28 '13 at 04:37
-
Are you kidding me??, it is available .I copied it from there for you. See here http://developer.apple.com/library/ios/DOCUMENTATION/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html#//apple_ref/occ/instm/MKMapView/addAnnotations: – Satheesh May 28 '13 at 04:41
-
Relax, from Xcode, option clicking did not bringing that up. It did not auto complete either. No need to be rude about it. – user1530580 May 28 '13 at 05:24
-
1Still, I don't think you are understanding what I am trying to do. I am using addAnotations to add an array of annotations at once. My question pertains to the annotation callouts. – user1530580 May 28 '13 at 05:27
-
@user1530580 I am not rude, come on. I like helping people around. – Satheesh May 28 '13 at 05:58
-
Okay okay, you want all your callouts at once not annotation points. – Satheesh May 28 '13 at 06:00