Note that there are some explanatory texts on larger screens.

plurals
  1. POAnnotation Detail View not Loading in Mapkit
    text
    copied!<p>I have a Map that shows various pins based on the users location. I can view the pins and there callouts without a problem. When I press the detail disclosure button, my MapDetailInfo does not load. Here is some of the code.</p> <pre><code>- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;) annotation { // Specify which MKPinAnnotationView to use for each annotation. MKPinAnnotationView *businessListingPin = (MKPinAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier: @"BLPin" ]; if (businessListingPin == nil) { businessListingPin = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"BLPin"]; } else { businessListingPin.annotation = annotation; } // If the annotation is the user's location, don't show the callout and change the pin color if(annotation == self.mapView.userLocation) { businessListingPin.canShowCallout = NO; businessListingPin.pinColor = MKPinAnnotationColorRed; } else { businessListingPin.canShowCallout = YES; businessListingPin.pinColor = MKPinAnnotationColorPurple; businessListingPin.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; } return businessListingPin; } - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { MapDetailInfo *abc = [[MapDetailInfo alloc]init]; UINavigationController *nav = [[UINavigationController alloc] init]; [nav pushViewController:abc animated:YES]; } </code></pre> <p>Not sure if it matters or not, but this is part of a tab bar application. Any help would be much appreciated. Thanks!</p>
 

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