rpt*_*thi 3 iphone google-maps mapkit ios4
我想检测一下注释引脚(的mapkit
),以便我可以对该事件执行操作.
现在,如果我触摸注释引脚,则会弹出默认注释标记.我想定制它来触摸引脚时调用我的方法.
您需要实现以下委托方法
(MKAnnotationView) mapView viewForAnnotation:(id) annotation
Run Code Online (Sandbox Code Playgroud)
然后在这个方法中声明以下内容
MKPinAnnotationView *view=[[MKPinAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:@"abc"];
view.canShowCallout=YES;
view.calloutOffset=CGPointMake(-20,10); //As per your choice
Run Code Online (Sandbox Code Playgroud)
然后你可以在你的标注中添加UI,例如UIButton或UIImage作为view.rightCalloutAccesoryView View.leftCalloutAccesoryView
归档时间: |
|
查看次数: |
3542 次 |
最近记录: |