Files
MapLibreParticleLab/platform/ios/src/MGLAnnotationContainerView.m
Jason Wray c067865e7b [ios, macos] Update minimum deployment versions to iOS 9, macOS 10.11 (#11776)
* [ios] Remove iOS 8 conditionals

* [ios, macos] Bump pod deployment targets

* [ios, macos] Add changelog entries

* [ios, macos] Update docs

* Remove unnecessary selector-based version checks

* Update SQLite note

* [ios, macos] Replace lightweight generics macros with direct use
   Lightweight generics for Foundation collections are available everywhere with the bump to iOS 9 and macOS 10.11.

* Update deprecated macOS method
2018-04-27 12:25:49 -04:00

53 lines
1.3 KiB
Objective-C

#import "MGLAnnotationContainerView.h"
#import "MGLAnnotationView.h"
@interface MGLAnnotationContainerView ()
@property (nonatomic) NSMutableArray<MGLAnnotationView *> *annotationViews;
@end
@implementation MGLAnnotationContainerView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
_annotationViews = [NSMutableArray array];
}
return self;
}
+ (instancetype)annotationContainerViewWithAnnotationContainerView:(nonnull MGLAnnotationContainerView *)annotationContainerView
{
MGLAnnotationContainerView *newAnnotationContainerView = [[MGLAnnotationContainerView alloc] initWithFrame:annotationContainerView.frame];
[newAnnotationContainerView addSubviews:annotationContainerView.subviews];
return newAnnotationContainerView;
}
- (void)addSubviews:(NSArray<MGLAnnotationView *> *)subviews
{
for (MGLAnnotationView *view in subviews)
{
[self addSubview:view];
[self.annotationViews addObject:view];
}
}
#pragma mark UIAccessibility methods
- (UIAccessibilityTraits)accessibilityTraits {
return UIAccessibilityTraitAdjustable;
}
- (void)accessibilityIncrement {
[self.superview.superview accessibilityIncrement];
}
- (void)accessibilityDecrement {
[self.superview.superview accessibilityDecrement];
}
@end