//
//   MAPointAnnotation+DDCategory.m
//   DDMAMapKit_Private
//   Created by DDIsFriend on 2023/1/31.
    

#import "MAPointAnnotation+DDCategory.h"
#import <objc/runtime.h>

@implementation MAPointAnnotation (DDCategory)
- (void)setDd_image:(UIImage *)dd_image{
    objc_setAssociatedObject(self, @selector(dd_image), dd_image, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (nullable UIImage *)dd_image{
    return objc_getAssociatedObject(self, _cmd);
}

- (void)setCustomCalloutView:(UIView *)customCalloutView{
    objc_setAssociatedObject(self, @selector(customCalloutView), customCalloutView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (nullable UIView *)customCalloutView{
    return objc_getAssociatedObject(self, _cmd);
}

- (void)setAnnotationClass:(Class)annotationClass{
    objc_setAssociatedObject(self, @selector(annotationClass), annotationClass, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (Class)annotationClass{
    return objc_getAssociatedObject(self, _cmd);
}

- (void)setTag:(int)tag{
    objc_setAssociatedObject(self, @selector(tag), @(tag), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (int)tag{
    return [objc_getAssociatedObject(self, _cmd) intValue];
}
@end
