上一个问题:Detect Callout overlap other UIViews in MKMapView,我想 - 我可以在视图的某个部分显示MKMapView
NOT 的标注当用户滚动时它会消失,这样它就不会出现在我创建的任何叠加层下面了吗?
修改
我得到了关于让它消失的部分:
func mapView(_ mapView: MKMapView, regionWillChangeAnimated animated: Bool) {
for annotation in mapView.selectedAnnotations {
mapView.deselectAnnotation(annotation, animated: true)
}
}
我仍然没有弄清楚如何防止标注出现在覆盖UIViews