This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[ios] Silence incompatible type warning for callout view - #8608
Merged
boundsj merged 2 commits intoApr 4, 2017
Merged
Conversation
This silences a compatibility warning that was introduced in a previous refactor that changed the return type of the callout view for annotation delegate method. This also adds checks to ensure that the callout view provided by the delegate to the map view is of the correct type and conforms to the correct protocol.
1ec5
reviewed
Mar 31, 2017
| calloutView = [self.delegate mapView:self calloutViewForAnnotation:annotation]; | ||
| id providedCalloutView = [self.delegate mapView:self calloutViewForAnnotation:annotation]; | ||
| if (providedCalloutView) { | ||
| NSAssert([providedCalloutView isKindOfClass:[UIView class]], @"callout view should be a kind of UIView"); |
Contributor
There was a problem hiding this comment.
This should be an NSException, not an NSAssert. Now that the return value of -mapView:calloutViewForAnnotation: is no longer required to be a kind of UIView, returning something other than a UIView is a developer error, not an SDK error.
|
|
||
| ## 3.5.1 | ||
|
|
||
| ### Other changes |
boundsj
force-pushed
the
boundsj-cleanup-calloutview
branch
from
April 3, 2017 21:54
70597a0 to
6b02bc9
Compare
1ec5
approved these changes
Apr 3, 2017
mappy-mobile
pushed a commit
to Mappy/mapbox-gl-native
that referenced
this pull request
Apr 12, 2017
…or_merge * release-ios-v3.5.0-android-v5.0.0: (31 commits) [qt] Renamed qt5 formula to qt macos-v0.4.1 [ios] Update podspecs and changelog for v3.5.2 [ios, macos] Guard against looking up annotation contexts MGLAnnotationTagNotFound (mapbox#8686) [ios] Update podspecs and changelog for v3.5.1 [ios, macos] Hardened std::map usage in MGLMapVIew [ios] replaced link to select a feature example (mapbox#8651) [ios, macos] Rename Data-driven styling guide (mapbox#8627) [ios] assertion to check if an annotationTag > 0 (mapbox#8588) [ios, macos] Preserve symlinks when zipping framework [ios] Silence incompatible type warning for callout view (mapbox#8608) Release android v5.0.2 (mapbox#8629) [macos] Removed MGLUserTrackingMode from jazzy ToC [macos] Fixed broken images in DDS guide [core] cache binary shaders on Android [core] Extract and de-templatize several Program static methods macos-v0.4.0 [ios, macos] Updated changelogs [ios] Replaced UIActionSheet, UIAlertView with UIAlertController [ios, macos] Copyedited data-driven styling guides ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #8420.
Fixes warning introduced in #8541
This silences a compatibility warning that was introduced in a previous refactor that changed the return type of the callout view for annotation delegate method. This also adds checks to ensure that the callout view provided by the delegate to the map view is of the correct type and conforms to the correct protocol.