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

[ios] Add annotation container view #5194

Merged
merged 1 commit into from
Jun 2, 2016
Merged

Conversation

boundsj
Copy link
Contributor

@boundsj boundsj commented May 31, 2016

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.

@boundsj boundsj added feature iOS Mapbox Maps SDK for iOS ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels May 31, 2016
@boundsj boundsj added this to the ios-v3.3.0 milestone May 31, 2016
@boundsj boundsj self-assigned this May 31, 2016
DA8848441CBAFB9800AB86E3 /* MGLCompactCalloutView.h */,
DA8848451CBAFB9800AB86E3 /* MGLCompactCalloutView.m */,
DA8848461CBAFB9800AB86E3 /* MGLLocationManager.h */,
DA8848471CBAFB9800AB86E3 /* MGLLocationManager.m */,
Copy link
Contributor

@1ec5 1ec5 May 31, 2016

Choose a reason for hiding this comment

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

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.

@1ec5
Copy link
Contributor

1ec5 commented May 31, 2016

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".
@boundsj boundsj force-pushed the boundsj_annotation_container branch from 0e8c987 to 64f41f8 Compare June 1, 2016 23:30
@boundsj boundsj removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Jun 1, 2016
@boundsj
Copy link
Contributor Author

boundsj commented Jun 2, 2016

@1ec5 I'm going to land this. I've added #5210 and #5212 as follow up work here.

@boundsj boundsj merged commit d9c6181 into master Jun 2, 2016
@boundsj boundsj deleted the boundsj_annotation_container branch June 2, 2016 00:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants