summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAnnotationView.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/src/MGLAnnotationView.m')
-rw-r--r--platform/ios/src/MGLAnnotationView.m40
1 files changed, 40 insertions, 0 deletions
diff --git a/platform/ios/src/MGLAnnotationView.m b/platform/ios/src/MGLAnnotationView.m
new file mode 100644
index 0000000000..9a82a8b332
--- /dev/null
+++ b/platform/ios/src/MGLAnnotationView.m
@@ -0,0 +1,40 @@
+#import "MGLAnnotationView.h"
+#import "MGLAnnotationView_Private.h"
+
+@interface MGLAnnotationView ()
+
+@property (nonatomic) id<MGLAnnotation> annotation;
+@property (nonatomic, readwrite, nullable) NSString *reuseIdentifier;
+
+@end
+
+@implementation MGLAnnotationView
+
+- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
+{
+ self = [super init];
+
+ if (self)
+ {
+ _reuseIdentifier = [reuseIdentifier copy];
+ }
+
+ return self;
+}
+
+- (void)prepareForReuse
+{
+ // Intentionally left blank. The default implementation of this method does nothing.
+}
+
+- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event
+{
+ // Allow mbgl to drive animation of this view’s bounds.
+ if ([event isEqualToString:@"bounds"])
+ {
+ return [NSNull null];
+ }
+ return [super actionForLayer:layer forKey:event];
+}
+
+@end \ No newline at end of file