views:

257

answers:

2

I have a MKMapView that has a pin and when pressed shows the annotiona Title and SubTitle.

Is there a way in code to have this text shown automatically so the user need not click it?

If I have many pins, can the all appear as well?

+1  A: 

This might help:

  • (void)setSelected:(BOOL)selected animated:(BOOL)animated
Nick
The docs say this is not to be used , You should not call this method directly. An MKMapView object calls this method in response to user interactions with the annotation.
BahaiResearch.com
That's a good point - sorry I missed the discussion item in the doc. I'm not sure if it is app store rejection worthy but I'm not aware of another way to do this. Curious from an HID standpoint if you attempting to trigger the overlay in response to another user action or if you are just trying to make a bunch Titles appear over multiple markers concurrently.
Nick
Yes, we have 1 to 3 pins and want all of them to appear each time the map appears.
BahaiResearch.com
+2  A: 

You need to use the selectAnnotation message on MKMapView:

- (void)selectAnnotation:(id <MKAnnotation>)annotation animated:(BOOL)animated

Selects the specified annotation and displays a callout view for it.

Cannonade
Thanks for the correction
Nick
@Nick No problem :)
Cannonade
I'll check the MonoTouch namespaces for that, thanks.
BahaiResearch.com