From dcb14f98ee534b22cae8a0f829302a0b2b2459b2 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Mon, 27 Mar 2017 14:26:59 -0700 Subject: [ios] Modify return type so callout bridges with protocol in Swift `- (nullable UIView *)mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id )annotation;` bridges with a `UIView?` return type in Swift. This changes replaces the `UIView` type in the method signature so that, when bridged to Swift, the returned object is defined as `MGLCalloutView?`. --- platform/ios/CHANGELOG.md | 6 ++++++ platform/ios/src/MGLMapViewDelegate.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 40795a2aef..027689696e 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -2,6 +2,12 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started. +## 3.5.1 + +### Other changes + +* Fixed an issue that caused the return type of a map view delegate method to bridge incorrectly to applications written in Swift. ([#8541](https://github.com/mapbox/mapbox-gl-native/pull/8541)) + ## 3.5.0 ### Packaging diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index c1faaa3d07..096711fcbb 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -456,7 +456,7 @@ NS_ASSUME_NONNULL_BEGIN @return A view conforming to the `MGLCalloutView` protocol, or `nil` to use the default callout view. */ -- (nullable UIView *)mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id )annotation; +- (nullable id )mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id )annotation; /** Returns the view to display on the left side of the standard callout bubble. -- cgit v1.2.1