In My Mapview i have sum annotation the annontion have a button who sent me to another view for more detail on this annotation
My code is
myAnnotation *myAnn = (myAnnotation *)annotation;
UIButton *discloseButton = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
[discloseButton addTarget: self action: @selector(showInfo:) forControlEvents: UIControlEventTouchUpInside];
annotationView.rightCalloutAccessoryView = discloseButton;
UIImageView *leftIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:myAnn.image]];
UIImage *pinImage = [UIImage imageNamed:@"pointer.png"];
[annotationView setImage:pinImage];
annotationView.leftCalloutAccessoryView = leftIconView;
return annotationView;
and
-(IBAction)showInfo:(id)sender
{
[self performSegueWithIdentifier:@"aa" sender:sender];
}
// envoie des données vers la detail d'une mission
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"aa"])
{
DetailViewController *detailviewcontroller = [segue destinationViewController];
detailviewcontroller.DetailModal = @[@"aa",@"aaa",@"aaa"];
}
}
How can I send the object annotation via click the botton for filling my table detailviewcontroller.DetailModal ?