This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[ios] Add annotation container view#5194
Merged
Merged
Conversation
| DA8848441CBAFB9800AB86E3 /* MGLCompactCalloutView.h */, | ||
| DA8848451CBAFB9800AB86E3 /* MGLCompactCalloutView.m */, | ||
| DA8848461CBAFB9800AB86E3 /* MGLLocationManager.h */, | ||
| DA8848471CBAFB9800AB86E3 /* MGLLocationManager.m */, |
Contributor
There was a problem hiding this comment.
This is a bad merge. I moved most of these files to the Annotations group in #5110. You should move MGLAnnotationContainerView.h/.m to that group but otherwise omit this diff.
Contributor
|
Looks good, other than the bad merge in the project file. |
Add a container view to hold annotations. This gets around a performance issue with `UIView:addSubview:` where adding views is N^2. It helps annotation views avoid cutting into callout views when the annotation views are transformed to be "flat".
0e8c987 to
64f41f8
Compare
Contributor
Author
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.
Fixes #5140
Fixes #5089
Adds a new UIView subclass to contain MGLAnnotationView instances and an API for helping to manage the addition of new annotations. To mitigate known performance issues with
UIView:addSubview:, this batches up the addition of subviews to the container before adding the container itself to the view hierarchy. The organization of the views in the separate container also naturally avoids the "piercing" issue seen before between annotations and callouts.