annotation disclosure button segue to UITableViewController
i got a map with 3 annotation pins with disclosure buttons on it, i want
to set a segue on the disclosure button such that when i click the button,
it brings me to my UITableViewController called "TableViewController"
here are the codes: map view.m
(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id
)annotation { MKPinAnnotationView *pinView = (MKPinAnnotationView
*)[mapview dequeueReusableAnnotationViewWithIdentifier:@"pinView"]; if
(!pinView) { pinView = [[MKPinAnnotationView alloc]
initWithAnnotation:annotation reuseIdentifier:@"pinView"];
pinView.pinColor = MKPinAnnotationColorRed; pinView.animatesDrop = YES;
pinView.canShowCallout = YES;
UIButton *rightButton = [UIButton
buttonWithType:UIButtonTypeDetailDisclosure];
pinView.rightCalloutAccessoryView = rightButton;
} else { pinView.annotation = annotation; } return pinView; }
(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view
calloutAccessoryControlTapped:(UIControl *)control
{
// what do i write here?
}
No comments:
Post a Comment