标注view
More...
#import <MAAnnotationView.h>
◆ initWithAnnotation:reuseIdentifier:
- (id) initWithAnnotation: |
|
(id< MAAnnotation >) |
annotation |
reuseIdentifier: |
|
(NSString *) |
reuseIdentifier |
|
|
| |
初始化并返回一个annotation view
- Parameters
-
annotation | 关联的annotation对象 |
reuseIdentifier | 如果要重用view,传入一个字符串,否则设为nil,建议重用view |
- Returns
- 初始化成功则返回annotation view,否则返回nil
◆ prepareForReuse
当从reuse队列里取出时被调用, 子类重新必须调用super
◆ setDragState:animated:
设置view的拖动状态
- Parameters
-
newDragState | 新的拖动状态 |
animated | 是否使用动画动画 |
◆ setSelected:animated:
- (void) setSelected: |
|
(BOOL) |
selected |
animated: |
|
(BOOL) |
animated |
|
|
| |
设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法
- Parameters
-
selected | 是否选中 |
animated | 是否使用动画效果 |
◆ annotation
◆ calloutOffset
- (CGPoint) calloutOffset |
|
readwritenonatomicassign |
弹出框默认位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是屏幕坐标
◆ canAdjustPositon
- (BOOL) canAdjustPositon |
|
readwritenonatomicassign |
弹出默认弹出框时,是否允许地图调整到合适位置来显示弹出框,默认为YES
◆ canShowCallout
◆ centerOffset
annotationView的中心默认位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是屏幕坐标
◆ customCalloutView
自定制弹出框view, 用于替换默认弹出框. 注意:此弹出框不会触发-(void)mapView: didAnnotationViewCalloutTapped: since 5.0.0
◆ draggable
◆ dragState
◆ enabled
◆ highlighted
◆ image
◆ imageView
- (UIImageView*) imageView |
|
readnonatomicstrong |
image所对应的UIImageView since 5.0.0
◆ leftCalloutAccessoryView
- (UIView*) leftCalloutAccessoryView |
|
readwritenonatomicstrong |
◆ reuseIdentifier
- (NSString*) reuseIdentifier |
|
readnonatomiccopy |
◆ rightCalloutAccessoryView
- (UIView*) rightCalloutAccessoryView |
|
readwritenonatomicstrong |
◆ selected
设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法
◆ zIndex
z值,大值在上,默认为0。类似CALayer的zPosition。zIndex属性只有在viewForAnnotation或者didAddAnnotationViews回调中设置有效。
The documentation for this class was generated from the following file: