Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Modify return type so callout bridges with protocol in Swift #8541

Merged

Conversation

boundsj
Copy link
Contributor

@boundsj boundsj commented Mar 27, 2017

Fixes #8420

- (nullable UIView <MGLCalloutView> *)mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id <MGLAnnotation>)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?.

@boundsj boundsj added annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS Swift Specific to the Swift/Objective-C bridge on iOS or macOS labels Mar 27, 2017
@boundsj boundsj added this to the ios-v3.5.1 milestone Mar 27, 2017
@boundsj boundsj self-assigned this Mar 27, 2017
@boundsj boundsj requested a review from 1ec5 March 27, 2017 21:29
@boundsj boundsj force-pushed the boundsj-return-callout-as-protocol branch from eebf86e to 2985953 Compare March 27, 2017 21:33
Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -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 <MGLCalloutView> *)mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id <MGLAnnotation>)annotation;
- (nullable id <MGLCalloutView>)mapView:(MGLMapView *)mapView calloutViewForAnnotation:(id <MGLAnnotation>)annotation;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is worth a mention in the iOS changelog.

`- (nullable UIView <MGLCalloutView> *)mapView:(MGLMapView *)mapView
calloutViewForAnnotation:(id <MGLAnnotation>)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?`.
@boundsj boundsj force-pushed the boundsj-return-callout-as-protocol branch from 2985953 to f374ea2 Compare March 29, 2017 23:09
@boundsj boundsj merged commit dcb14f9 into release-ios-v3.5.0-android-v5.0.0 Mar 29, 2017
@boundsj boundsj deleted the boundsj-return-callout-as-protocol branch March 29, 2017 23:58
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: normally we don’t break out patch releases by topic, since they’re so small. This will be pretty easy to address right before release when we copy-edit release notes anyhow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS Swift Specific to the Swift/Objective-C bridge on iOS or macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants