8 #import <UIKit/UIKit.h>
11 typedef NS_ENUM(NSInteger,
LMKAnnotationViewDragState)
13
LMKAnnotationViewDragStateNone = 0,
14
LMKAnnotationViewDragStateStarting,
15
LMKAnnotationViewDragStateDragging,
16
LMKAnnotationViewDragStateCanceling,
17
LMKAnnotationViewDragStateEnding
20 @class LMKCalloutView;
22 @protocol LMKRecyclableView;
35 -
(instancetype)initWithAnnotation:(
id
<
LMKAnnotation>)annotation
reuseIdentifier:(NSString *)reuseIdentifier;
55 @property (nonatomic, strong)
id <LMKAnnotation> annotation;
60 @property (nonatomic, strong)
UIImage *
image;
75 @property (nonatomic,
getter=isEnabled) BOOL
enabled;
80 @property (nonatomic,
getter=isSelected) BOOL
selected;
87 -
(void)setSelected:(BOOL)selected animated:(BOOL)animated;
107 @property (nonatomic,
getter=isDraggable) BOOL
draggable;
112 @property (nonatomic)
LMKAnnotationViewDragState
dragState;
117 -
(void)setDragState:(LMKAnnotationViewDragState)newDragState
animated:(BOOL)animated;
NSString * reuseIdentifier
复用标志
Definition: LMKAnnotationView.h:41
BOOL canShowCallout
当为YES时,view被选中时会弹出气泡,默认为YES
Definition: LMKAnnotationView.h:92
BOOL draggable
是否支持拖动
Definition: LMKAnnotationView.h:107
CGPoint calloutOffset
默认情况下,
弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移...
Definition: LMKAnnotationView.h:70
UIImage * image
annotation view显示的图像
Definition: LMKAnnotationView.h:60
UIView * rightCalloutAccessoryView
显示在气泡右侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值)
...
Definition: LMKAnnotationView.h:102
标注view
Definition: LMKAnnotationView.h:27
BOOL enabled
默认为YES,当为NO时view忽略触摸事件
Definition: LMKAnnotationView.h:75
BOOL selected
默认为NO,当view被点中时被设为YES
Definition: LMKAnnotationView.h:80
UIView * leftCalloutAccessoryView
显示在气泡左侧的view(使用默认气泡时,view的width最大值为44,height最大值为44,大于则使用最大值)
...
Definition: LMKAnnotationView.h:97
该类为标注点的protocol,提供了标注类的基本信息函数
Definition: LMKAnnotation.h:15
LMKCalloutView * calloutView
气泡
Definition: LMKAnnotationView.h:45
LMKAnnotationViewDragState dragState
当前view的拖动状态
Definition: LMKAnnotationView.h:112
CGPoint centerOffset
默认情况下, annotation
view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏...
Definition: LMKAnnotationView.h:65
typedef NS_ENUM(NSInteger,
LMKAnnotationViewDragState)
Definition: LMKAnnotationView.h:11
void prepareForReuse()
当view从reuse队列里取出时被调用,默认不做任何事