# 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.

- `-calloutViewShouldHighlight:`

  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;

  Swift

      optional func calloutViewShouldHighlight(_ calloutView: Any!) -> Bool

  View Source on GitHub
- `-calloutViewTapped:`

  Tells the delegate that the callout view has been tapped.

  #### Declaration

  Objective-C

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

  Swift

      optional func calloutViewTapped(_ calloutView: Any!)

  View Source on GitHub
- `-calloutViewWillAppear:`

  Called before the callout view appears on screen, or before the appearance animation will start.

  #### Declaration

  Objective-C

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

  Swift

      optional func calloutViewWillAppear(_ calloutView: Any!)

  View Source on GitHub
- `-calloutViewDidAppear:`

  Called after the callout view appears on screen, or after the appearance animation is complete.

  #### Declaration

  Objective-C

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

  Swift

      optional func calloutViewDidAppear(_ calloutView: Any!)

  View Source on GitHub