Note that there are some explanatory texts on larger screens.

plurals
  1. POdetailButton unable to push information over. Pushed page always have empty labels
    primarykey
    data
    text
    <p>Hi can some1 plz help me....</p> <p>The problem is this: Everything seems alright.. i am able to push to another page once i tap on the detailButton. However, the page which i am able to push to is always only a view without any values passed into the labels. All my labels in the view have nothing inside.. Am i doing something wrong or any wrong concept here? </p> <pre><code>- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;)annotation { BOOL isRed = NO; //BOOL isPurple = YES; if([annotation isKindOfClass:[MyAnnotation2 class]]) isRed = YES; MKPinAnnotationView *pinView = nil; if(isRed) { static NSString *redPin = @"redPin"; pinView = (MKPinAnnotationView *) [mapView dequeueReusableAnnotationViewWithIdentifier:redPin]; if (!pinView) { pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:redPin] autorelease]; pinView.pinColor = MKPinAnnotationColorRed; pinView.animatesDrop = YES; pinView.canShowCallout = YES; UIButton *detailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinView.rightCalloutAccessoryView = detailButton; } else{ pinView.annotation = annotation; } } else { static NSString *greenPin = @"greenPin"; pinView = (MKPinAnnotationView *) [mapView dequeueReusableAnnotationViewWithIdentifier:greenPin]; if (!pinView) { pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:greenPin] autorelease]; pinView.pinColor = MKPinAnnotationColorGreen; pinView.animatesDrop = NO; pinView.canShowCallout = YES; UIButton *detailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinView.rightCalloutAccessoryView = detailButton; } } return pinView; } </code></pre> <p>//</p> <pre><code>- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { NSLog(@"calloutAccessoryControlTapped"); if (self.patientDetailsViewController == nil) { self.patientDetailsViewController = [[[PatientDetailsViewController alloc] initWithNibName:@"PatientDetailsViewController" bundle:nil] autorelease]; } MyAnnotation2 *selectedObject = (MyAnnotation2 *)view.annotation; _patientDetailsViewController.nric = selectedObject.title; NSLog(@"%@",_patientDetailsViewController.nric); [self.navigationController pushViewController:_patientDetailsViewController animated:YES]; </code></pre> <p>}</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.
    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