调用 [_mapView showAnnotations:self.annotationArray animated:YES]; 时,想显示所有标注,发现不能按照自己的想法控制,有时会被其他控件遮盖,显示不全。
此时可调用下面的方法
[_mapView showAnnotations:self.annotationArray edgePadding:UIEdgeInsetsMake(150, 150, 150,150) animated:YES];
其中 edgePadding 是距离地图边距 上 左下右 的距离。 所有标注点都会显示在框出来的这个矩形内。