I have a MKMapView annotation object that has a right callout accessory detail disclosure button. When the button is pressed I am using addTarget:action:forControlEvent to call a selector method which creates a detail viewController and pushes it onto the view stack.
My question is what is the best way to access the information on the annotation that initiated the callout detail controller. The detail disclosure button is set to call:
[button addTarget:self action:@selector(disclosurePressed:) forControlEvents:UIControlEventTouchUpInside];
Which looks like this:
- (void)disclosurePressed:(id)sender {
}
I guess I could look for the parent annotation of the sender UIButton, can anyone give me any pointers to how this is best done.