MapKit 取消选择注释并且弹出窗口没有动画
我有一些自定义注释,当按下标注附件控件时,会出现一个弹出窗口,显示更多信息(就像 Apple 的地图应用程序一样)。
一切都有效,除了它们没有动画,即使动画设置为“是”?
代码:
- (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];
}
I have some custom annotations, and when pressed on the callout accessory control, a popup appears to show more information (like in the maps app from Apple).
Every thing works, except that they don't animate, even when animate is set to YES?
code:
- (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];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论