MapKit取消选择Annotation并且popover不会设置动画

时间:2011-12-15 10:27:07

标签: iphone ios ipad mapkit uipopovercontroller

我有一些自定义注释,当按下标注附件控件时,弹出窗口会显示更多信息(例如来自Apple的地图应用程序)。

除非它们没有动画,否则每件事都有效,即使动画设置为YES?

代码:

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
    [mapView deselectAnnotation:view.annotation animated:YES];

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];

    _basePopupViewController = [storyboard instantiateViewControllerWithIdentifier:@"BasePopupViewController"];
    _popover = [[UIPopoverController alloc] initWithContentViewController:_basePopupViewController];

    [_popover presentPopoverFromRect:view.bounds inView:view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; 
}

0 个答案:

没有答案