i am developing a new application. i also used MapKitView and drop some pins. i m take an id array, but i can't acces the id to that pins separately, can you help me? thanks in advance...
Asked
Active
Viewed 181 times
0
-
What you want to do ? What have you tried ? – Maulik May 18 '12 at 11:49
-
You should post code and point out where the exact difficulty is. I don't recommend the "tag" approach that has been suggested. For better alternatives, see http://stackoverflow.com/questions/4565197/how-to-find-which-annotation-send-showdetails, http://stackoverflow.com/questions/8256288/how-to-pass-sender-tag-in-detailview-to-get-default-map-application-for-directio, http://stackoverflow.com/questions/9876042/annotation-details-after-detail-disclosure-pressed, http://stackoverflow.com/questions/5939223/store-data-in-mkannotation, etc. – May 18 '12 at 14:39
1 Answers
1
FOr this you have to set tag property with pin. When annotation did select method called then retrive tag fron pin and get value from array with the help of tag and send it to another class
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
rightButton.tag = annotationIndex;
[rightButton addTarget:self action:@selector(showDetails:) forControlEvents:UIControlEventTouchUpInside];
pinView.rightCalloutAccessoryView = rightButton;