我有地图视图,其中很少有MKPointAnnotation。
所有这些都是可行的,但是,视图的MKPoiintAnnotation的“背景”是“不可见的”,所以它不是很“可见”。
我想把背景改成白色,我试着用:
但我没能用这种方法改变背景。我需要用什么?Thx,
编辑:所谓“背景”,我想指的是文本“当前位置”下的背景(对于本例来说):

编辑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];发布于 2014-09-02 14:37:39
您需要构建一个自定义注释,您可能需要遵循本教程:
http://blog.asynchrony.com/2010/09/building-custom-map-annotation-callouts-part-2/
发布于 2016-07-08 17:16:10
如果您的MapView在UITableView中,则需要将selectionStyle设置为UITableViewCellSelectionStyle.None。
例如,在Swift中,我在自定义表单元格类的awakeFromNib函数中添加了以下内容:
override func awakeFromNib() {
super.awakeFromNib()
// Selection style for the cell
self.selectionStyle = UITableViewCellSelectionStyle.None
}https://stackoverflow.com/questions/25625714
复制相似问题