Note that there are some explanatory texts on larger screens.

plurals
  1. POshow another view when map annotation are clicked
    primarykey
    data
    text
    <p>I have a map with only one annotation.I created a simple class which I want it to show when the user clicks on the annotation.The problem is that when I click on the annotation nothing happens.</p> <p>Here is my code:</p> <pre><code>- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{ NSLog(@"Reverse Geocoder completed"); mPlacemark=placemark; [mapView addAnnotation:placemark]; } - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;) annotation{ MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"]; annView.animatesDrop=TRUE; //create UIButton for annotation UIButton *detailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; //NSInteger annotationValue = [self.annotations indexOfObject:annotation]; [detailButton addTarget:self action:@selector(showDetailView:) forControlEvents:UIControlEventTouchUpInside]; annView.rightCalloutAccessoryView=detailButton; return annView; } -(void)showDetailView:(id)sender{ NSLog("inside the stupid method"); MyDetailViewController *detailView=[[MyDetailViewController alloc] initWithNibName:@"MyDetailViewController" bundle:nil]; [[self navigationController] pushViewController:detailView animated:YES]; [detailView release]; } </code></pre> <p>My <code>showDetailView</code> function never gets called.Please help me.I'm new to iphone and I might forget a simple thing.Thanks</p> <p>Still not working!!!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload