Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Custom callout: stay open during panning (and some refactoring) #108

Merged
merged 6 commits into from
Aug 21, 2017

Conversation

friedbunny
Copy link
Contributor

@friedbunny friedbunny commented Aug 16, 2017

Implements MGLCalloutView’s anchoredToAnnotation and dismissesAutomatically from mapbox/mapbox-gl-native#7646 in our custom callout view example.

Because of mapbox/mapbox-gl-native#9228, this also overrides the center property of the custom callout view, otherwise its position will shift undesirably when the user first interacts with the map.

Also:

  • Selects the annotation in viewDidLoad so that the callout appears automatically.
  • Moves the annotation property checks to mapView:annotationCanShowCallout:, which seems like a more natural fit than mapView:calloutViewForAnnotation:.
  • Fixes a really annoying intermittent hairline gap between the arrow and label of the callout view. 😑
  • Re-adds lazy vars, because that Swift bug has been fixed.
  • Updates the project for CocoaPods 1.3.1.

/cc @jmkiley @frederoni @captainbarbosa

@friedbunny friedbunny force-pushed the fb-feng-shui-the-callout-center branch from 12e326b to 7961bd1 Compare August 16, 2017 21:31
@friedbunny
Copy link
Contributor Author

👋 @jmkiley @frederoni

Copy link
Contributor

@jmkiley jmkiley left a comment

Choose a reason for hiding this comment

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

LGTM 🙇‍♀️

@friedbunny friedbunny merged commit 7961bd1 into master Aug 21, 2017
@friedbunny friedbunny deleted the fb-feng-shui-the-callout-center branch August 21, 2017 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants