【发布时间】:2021-10-14 16:50:39
【问题描述】:
正如我使用后的标题所说:
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
...
let shapeLayer = CAShapeLayer()
shapeLayer.path = UIBezierPath(ovalIn: rect).cgPath
shapeLayer.backgroundColor = backgroundColor?.cgColor
mkAnnotationView?.layer.mask = shapeLayer //<- window showing title stops working
当我在地图中按下注释视图时,显示标题(有问题的检查图像)的自定义视图从不显示。
我看不出这些代码行会如何影响此功能...
有人可以帮我吗?
【问题讨论】:
标签: swift mapkit mkannotation mkannotationview