tags:

views:

233

answers:

0

I would like make mapkit's callout's DetailDisclosure button to navigate to detailed page for each annotations.

At this point I am reading annotations from .plist and I wonder how can I make there button to link to each others.

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control

{ // here!! doesnt work NSDictionary *dictionary =[[calloutAccessoryControlTapped] initWithAnnotation];

//Get the children of the present item.
NSArray *Children = [dictionary objectForKey:@"Children"];

if([Children count] == 0) {
 NSInteger ViewNumber = [[dictionary objectForKey:@"View"] integerValue];
 switch (ViewNumber) {
  case 1: {
   detailViewController *detailView = [[detailViewController alloc] initWithNibName:@"detailView" bundle:[NSBundle mainBundle]];
   detailView.navigationItem.title = @"test1";
   [self.navigationController pushViewController:detailView animated:YES];
   [detailView release];
  }
   break;
  case 2: {
   detailViewController *detailView = [[detailViewController alloc] initWithNibName:@"detailView" bundle:[NSBundle mainBundle]];
   detailView.navigationItem.title = @"test2";
   [self.navigationController pushViewController:detailView animated:YES];
   [detailView release];
  }
   break;
 }
}

}

Is there any body know how?