Files
MapLibreParticleLab/platform/ios/src/MLNAnnotationContainerView.m
mwilsnd 20d9e1028c Platform flattening overhaul (#1393)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2023-07-26 17:50:34 +02:00

53 lines
1.3 KiB
Objective-C

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