gpt4 book ai didi

iOS 后台 MKPointAnnotation

转载 作者:行者123 更新时间:2023-11-29 02:42:10 28 4
gpt4 key购买 nike

我有 map View ,其中几乎没有 MKPointAnnotation。

一切正常,但是, View 的 MKPoiintAnnotation 的“背景”是“不可见的”,因此不是很“可见”。

我想将 te 背景更改为白色,我尝试使用:

  • (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation

但是我用这个方法换背景没成功。我需要使用什么?谢谢,

编辑:“背景”是指文本“当前位置”下的背景(对于本例):

enter image description here

编辑 2:

我正在使用此代码添加注释:

                annotationPoint = [[MKPointAnnotation alloc] init];
annotationCoord.latitude = [[item getPlace] getLatitude];
annotationCoord.longitude = [[item getPlace] getLongitude];
annotationPoint.coordinate = annotationCoord;
annotationPoint.title = item.getNom;
annotationPoint.subtitle = [Utils getDateString :item.getDeadline :@"dd/MM/yyyy HH:mm"];
[_mapView addAnnotation:annotationPoint];

最佳答案

您需要构建自定义注释,您可能需要按照本教程进行操作:

http://blog.asynchrony.com/2010/09/building-custom-map-annotation-callouts-part-2/

关于iOS 后台 MKPointAnnotation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25625714/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com