10#import "QAnnotatioViewDefines.h"
29- (id)initWithAnnotation:(
id <QAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier;
44@property (nonatomic, strong) id <QAnnotation>
annotation;
49@property (nonatomic, assign)
int zIndex;
54@property (nonatomic, strong) UIImage *
image;
75@property (nonatomic, assign) QAnnotationViewCollisionType
collisionType;
85@property (nonatomic, getter=isEnabled) BOOL
enabled;
90@property (nonatomic, getter=isSelected) BOOL
selected;
98- (void)setSelected:(BOOL)selected animated:(BOOL)animated;
123@property (nonatomic, getter=isDraggable) BOOL
draggable;
128@property (nonatomic) QAnnotationViewDragState
dragState;
136- (void)setDragState:(QAnnotationViewDragState)newDragState animated:(BOOL)animated;
annotation数据的内容展示View
定义 QAnnotationView.h:20
UIView * leftCalloutAccessoryView
气泡左侧的view
定义 QAnnotationView.h:113
QAnnotationViewDragState dragState
当前view拖动状态
定义 QAnnotationView.h:128
QAnnotationViewCollisionRelation collisionRelation
AnnotationView上元素的碰撞关系
定义 QAnnotationView.h:80
BOOL selected
是否处于选中状态
定义 QAnnotationView.h:90
CGPoint centerOffset
默认情况下,annotationView的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素
定义 QAnnotationView.h:65
BOOL draggable
是否支持拖动
定义 QAnnotationView.h:123
BOOL canShowCallout
设置是否可以显示callout,默认为NO
定义 QAnnotationView.h:103
CGPoint calloutOffset
默认情况下,弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素
定义 QAnnotationView.h:70
UIImage * image
显示的image
定义 QAnnotationView.h:54
UIView * rightCalloutAccessoryView
气泡右侧的view
定义 QAnnotationView.h:118
void prepareForReuse()
当从reuse队列里取出时被调用
QAnnotationViewCollisionType collisionType
AnnotationView的碰撞类型
定义 QAnnotationView.h:75
UIView * customCalloutView
自定义callout.
定义 QAnnotationView.h:108
BOOL enabled
默认为YES,当为NO时view忽略触摸事件
定义 QAnnotationView.h:85
int zIndex
z值, 决定了AnnotationView之间的压盖顺序: 值大的在上部. 默认为0. 被选中的无视zIndex会被置顶
定义 QAnnotationView.h:49
UIImageView * innerImageView
image 对应的 UIImageView
定义 QAnnotationView.h:60
NSString * reuseIdentifier
复用标识
定义 QAnnotationView.h:34
id< QAnnotation > annotation
关联的annotation
定义 QAnnotationView.h:44