我正在使用带有来自简单注释的标注的 mapView。我使用了下面的委托方法
- (void)mapView:(MKMapView *)_mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
lbhProfileMapPoint *mp = (lbhProfileMapPoint *) view.annotation;
NSLog(@"mp objectID: %@", mp.objectID);
self.objectId = mp.objectID;
[[lbhVariables sharedInstance] setMapViewChosenObjectId:self.objectId];
//[self performSegueWithIdentifier:@"profileSegue" sender:self];
lbhProfileViewController *pvc = [[lbhProfileViewController alloc] init];
[pvc setObjectId:self.objectId];
[self.navigationController pushViewController:pvc animated:NO];
}
它没有转到视图控制器,但一直在说
Unbalanced calls to begin/end appearance transitions for <lbhProfileViewController: 0x1f017ec0>.
实际上是 lbhProfileViewController,它通过其他视图控制器连接到我的故事板中。但是有了这个附件标注,我想手动调用它。如你所见,我有
//[self performSegueWithIdentifier:@"profileSegue" sender:self];
在代码中,但如果我改用这个方法,它仍然会给我不平衡的调用。