diff options
author | Jesse Bounds <jesse@rebounds.net> | 2016-06-01 17:36:07 -0700 |
---|---|---|
committer | Jesse Bounds <jesse@rebounds.net> | 2016-06-01 17:36:07 -0700 |
commit | d9c6181f347c3d6b3cfd4bca7c5ded0d6d93e63d (patch) | |
tree | cbe8e24f775a45dd722189bf79c3281b3ec3910b /platform/ios/src/MGLAnnotationContainerView.h | |
parent | ce98a7bee7709cd07e7f064215474903a90a0836 (diff) | |
download | qtlocation-mapboxgl-d9c6181f347c3d6b3cfd4bca7c5ded0d6d93e63d.tar.gz |
[ios] Add annotation container view (#5194)
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".
Diffstat (limited to 'platform/ios/src/MGLAnnotationContainerView.h')
-rw-r--r-- | platform/ios/src/MGLAnnotationContainerView.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/ios/src/MGLAnnotationContainerView.h b/platform/ios/src/MGLAnnotationContainerView.h new file mode 100644 index 0000000000..90d2964831 --- /dev/null +++ b/platform/ios/src/MGLAnnotationContainerView.h @@ -0,0 +1,17 @@ +#import <UIKit/UIKit.h> + +#import "MGLTypes.h" + +@class MGLAnnotationView; + +NS_ASSUME_NONNULL_BEGIN + +@interface MGLAnnotationContainerView : UIView + ++ (instancetype)annotationContainerViewWithAnnotationContainerView:(MGLAnnotationContainerView *)annotationContainerView; + +- (void)addSubviews:(NS_ARRAY_OF(MGLAnnotationView *) *)subviews; + +@end + +NS_ASSUME_NONNULL_END |