我是我的 iPhone map View 应用程序,当我单击注释图像时,它会变成图钉。谁能告诉我如何纠正它?
我的想法是显示图像而不是自定义图钉,即使它被单击。
最佳答案
当您单击注释时,将调用此委托(delegate)
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
//I think here you will be adding a annotation(my assumption)
[mapView addAnnotation:yourAnnotation];
//This will call viewForAnnotation again
}
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
//If you didnt specify the a image for the annotation the default pin image will be assigned here..
}
如果我的假设是错误的,那么在这里发布你的代码相关注释,这样你就可以获得更好的答案
关于ios - MKMapView 注释图像更改为单击时固定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4966796/