MGLCalloutViewDelegate

@protocol MGLCalloutViewDelegate <NSObject>

The MGLCalloutViewDelegate protocol defines a set of optional methods that you can use to receive messages from an object that conforms to the MGLCalloutView protocol. The callout view uses these methods to inform the delegate that the user has interacted with the the callout view.

  • Returns a Boolean value indicating whether the entire callout view “highlights” when tapped. The default value is YES, which means the callout view highlights when tapped.

    The return value of this method is ignored unless the delegate also responds to the -calloutViewTapped method.

    Declaration

    Objective-C

    - (BOOL)calloutViewShouldHighlight:
            (nonnull UIView<MGLCalloutView> *)calloutView;
  • Tells the delegate that the callout view has been tapped.

    Declaration

    Objective-C

    - (void)calloutViewTapped:(nonnull UIView<MGLCalloutView> *)calloutView;