자랑스럽지 않습니다. 이,하지만 ... 나는 해결책을 찾았다. 필자는 tableview를 설정하는 데 사용 된 배열의 인덱스를 기반으로 개별 주석에 대한 태그 값을 설정했습니다.
-(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
//So, we clicked that disclosure button
//TODO: This is really hacky... What is proper way to do this?
ServicesViewController *vc = [self.navigationController.viewControllers objectAtIndex:1];
[vc infoButtonPressed:control.tag];
은} 이제 ServicesViewController에서 우리는이 작업을 수행 할 수 있습니다
- (void) infoButtonPressed:(NSInteger) index {
// decided against this first step, as graver's answer explains, it does not really make sense
//[self.navigationController popViewControllerAnimated:false];
//index should be nav array index we want to push
//so simulate a table-row click
[self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
가}
오, 세상에 ... 내가 그것을 알아 냈다고 생각합니다. 공개 버튼에 대한 델리게이트를지도보기 컨트롤러가 아닌 표보기 컨트롤러로 설정해야합니까? 이봐. – Bryan