[ios] tweaks to match code style for 1a5c452 callout tap handler
This commit is contained in:
@@ -570,12 +570,6 @@ IB_DESIGNABLE
|
||||
|
||||
/** @name Managing Annotations */
|
||||
|
||||
/* Tells the delegate that the user tapped on the callout view itself.
|
||||
*
|
||||
* @param mapView The map view containing the specified annotation.
|
||||
* @param annotation The annotation whose button was tapped.*/
|
||||
- (void)mapView:(MGLMapView *)mapView tapOnLabelForAnnotation:(id <MGLAnnotation>)annotation;
|
||||
|
||||
/** Tells the delegate that the user tapped one of the annotation's accessory buttons.
|
||||
*
|
||||
* Accessory views contain custom content and are positioned on either side of the annotation title text. If a view you specify is a descendant of the `UIControl` class, the map view calls this method as a convenience whenever the user taps your view. You can use this method to respond to taps and perform any actions associated with that control. For example, if your control displayed additional information about the annotation, you could use this method to present a modal panel with that information.
|
||||
@@ -587,6 +581,11 @@ IB_DESIGNABLE
|
||||
* @param control The control that was tapped. */
|
||||
- (void)mapView:(MGLMapView *)mapView annotation:(id <MGLAnnotation>)annotation calloutAccessoryControlTapped:(UIControl *)control;
|
||||
|
||||
/** Tells the delegate that the user tapped on an annotation's callout view.
|
||||
* @param mapView The map view containing the specified annotation.
|
||||
* @param annotation The annotation whose callout was tapped.*/
|
||||
- (void)mapView:(MGLMapView *)mapView tapOnCalloutForAnnotation:(id <MGLAnnotation>)annotation;
|
||||
|
||||
#pragma mark - Selecting Annotations
|
||||
|
||||
/** @name Selecting Annotations */
|
||||
|
||||
@@ -79,7 +79,11 @@ mbgl::util::UnitBezier MGLUnitBezierForMediaTimingFunction(CAMediaTimingFunction
|
||||
|
||||
#pragma mark - Private -
|
||||
|
||||
@interface MGLMapView () <UIGestureRecognizerDelegate, GLKViewDelegate, CLLocationManagerDelegate, UIActionSheetDelegate, SMCalloutViewDelegate>
|
||||
@interface MGLMapView () <UIGestureRecognizerDelegate,
|
||||
GLKViewDelegate,
|
||||
CLLocationManagerDelegate,
|
||||
UIActionSheetDelegate,
|
||||
SMCalloutViewDelegate>
|
||||
|
||||
@property (nonatomic) EAGLContext *context;
|
||||
@property (nonatomic) GLKView *glView;
|
||||
@@ -1451,11 +1455,11 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)calloutViewClicked:(SMCalloutView *__attribute__ ((unused)))calloutView
|
||||
- (void)calloutViewClicked:(__unused SMCalloutView *)calloutView
|
||||
{
|
||||
if ([self.delegate respondsToSelector:@selector(mapView:tapOnLabelForAnnotation:)])
|
||||
if ([self.delegate respondsToSelector:@selector(mapView:tapOnCalloutForAnnotation:)])
|
||||
{
|
||||
[self.delegate mapView:self tapOnLabelForAnnotation:self.selectedAnnotation];
|
||||
[self.delegate mapView:self tapOnCalloutForAnnotation:self.selectedAnnotation];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user