Files
MapLibreParticleLab/platform/ios/src/MLNCompactCalloutView.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

40 lines
754 B
Objective-C

#import "MLNCompactCalloutView.h"
#import "MLNAnnotation.h"
@implementation MLNCompactCalloutView
{
id <MLNAnnotation> _representedObject;
}
@synthesize representedObject = _representedObject;
+ (instancetype)platformCalloutView
{
return [[self alloc] init];
}
- (BOOL)isAnchoredToAnnotation {
return YES;
}
- (BOOL)dismissesAutomatically {
return NO;
}
- (void)setRepresentedObject:(id <MLNAnnotation>)representedObject
{
_representedObject = representedObject;
if ([representedObject respondsToSelector:@selector(title)])
{
self.title = representedObject.title;
}
if ([representedObject respondsToSelector:@selector(subtitle)])
{
self.subtitle = representedObject.subtitle;
}
}
@end