Quote:
Originally Posted by TUX2K
How did catch the click on the annotion?
Did you use:
Code:
- (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
Also did you set the delegate of the map to your class?
|
I set the map / annotations / detail view up standalone and it all works. Does not work when I incorporate it into the app using the tab-bar. This is the code for the button action:
- (IBAction)showLinks

id)sender
{
int nrButtonPressed = ((UIButton *)sender).tag;
if (nrButtonPressed < 99999) {
if (self.showDetailView == nil) {
detailView *tmpViewController = [[detailView alloc] initWithNibName:@"detailView" bundle:nil];
self.showDetailView = tmpViewController;
[tmpViewController release];
}
[self.navigationController pushViewController:self.showDetailView animated:YES];
if (nrButtonPressed == 1) {
[self.showDetailView.detailDescription setText:@"Description 1"];
}
if (nrButtonPressed == 2) {
[self.showDetailView.detailDescription setText:@"Description 2"];
}
self.showDetailView.title = @"Detail";
}
}