Custom MKAnnotation callout bubble with button

前端 未结 3 1930
醉话见心
醉话见心 2020-11-27 12:52

I\'m developing app, where user is localized by gps and then he is asked, whether he is located in specific place. To confirm this, callout bubble is presented to him straig

3条回答
  •  鱼传尺愫
    2020-11-27 13:01

    (void)mapView:(MKMapView *)mapViewIn didSelectAnnotationView:(MKAnnotationView *)view {
        if(![view.annotation isKindOfClass:[MKUserLocation class]])
        {
            CustomeCalloutViewController *calloutView = [[CustomeCalloutViewController alloc]initWithNibName:@"CustomeCalloutViewController" bundle:nil];
            [calloutView setPopinTransitionStyle:BKTPopinTransitionStyleSlide];
            [calloutView setPopinTransitionDirection:BKTPopinTransitionDirectionTop];
            [self presentPopinController:calloutView animated:YES completion:^{
                NSLog(@"Popin presented !");
            }];
            [mapView deselectAnnotation:view.annotation animated:true];
        }
    }
    

提交回复
热议问题