Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: MKAnnotation show popup?

I have a MKMapView that has a pin than when pressed shows the annotation's title and subtitle.

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

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

like image 925
Ian Vink Avatar asked Jan 22 '23 03:01

Ian Vink


2 Answers

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.

like image 89
RedBlueThing Avatar answered Jan 29 '23 15:01

RedBlueThing


This might help:

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
like image 36
Nick Avatar answered Jan 29 '23 15:01

Nick