MapKit deselect Annotation and popover does not an

2019-05-26 18:23发布

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]; 
}

0条回答
登录 后发表回答