Repository navigation
Make custom callout views easier to use [WIP] - #4948
friedbunny wants to merge 9 commits into
Conversation
|
This is still a big work-in-progress; b6c0c9f is my stopping point for tonight. My approach so far has been to go through with a machete, showing wanton disregard for backwards compatibility, but clearly we’ll have to address deprecation one way or another before this is ready to go. |
| */ | ||
| - (void)calloutViewDidAppear:(UIView<MGLCalloutView> *)calloutView; | ||
| @property (nonatomic, weak) id<MGLCalloutViewDelegate> delegate; | ||
|
|
There was a problem hiding this comment.
This is slated for removal.
|
Pushing this off of v3.3.0 — haven’t made enough progress and there’s a lot of other validation to do for that release. I may keep picking at this in the meantime, though. |
|
Please clarify if that means I have to allocate all the callout views for all the annotations on the map and keep those views in the memory even though user may never click on those? |
|
@andrewstay, by the time this feature lands, it’ll work similarly to annotation views. Callout views will go into a reuse queue, so the number of allocated views will be limited. |
- Add `canShowCallout` and `callout` to non-multipoint annotation types - Temporarily make callouts non-tappable - Add `detailAccessoryView` (unused) - Break custom callout views
Also, include callout properties in object description.
a9941ed to
042d720
Compare
|
This has been rebased onto the current |
|
So stale. Hopefully this will happen eventually! |
Following on from #4392, this pull request aims to simplify custom callout view creation and usage.
Changes
MGLCalloutViewprotocol-detailAccessoryView.MGLCalloutViewDelegateMGLAnnotation(Really, onlyMGLPointAnnotation)-canShowCalloutboolean property.-calloutViewproperty that conforms toMGLCalloutViewprotocol.MGLCompactCalloutViewSMCalloutViewwith custom implementation.Todo
-[MGLMapView mapView:annotation:calloutAccessoryControlTapped:].MGLCalloutView.annotation?titleandsubtitleproperties, maybe let the callout implementation do that directly with a passed-inannotation.MGLMapViewfor dead delegate methods; remove or deprecate.-mapView:annotationCanShowCallout:-mapView:calloutViewForAnnotation:-mapView:tapOnCalloutForAnnotation:-mapView:rightCalloutAccessoryViewForAnnotation:-mapView:leftCalloutAccessoryViewForAnnotation:Stretch goals
MGLCalloutViewprotocol.Enable callout views forPunted per Make custom callout views easier to use [WIP] #4948 (comment).MGLMultiPoint(polylines, polygons)/cc @1ec5 @boundsj