Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的地图上有很多图钉,我想为最可见图钉的标注设置动画。如何检查引脚的 CLLocationCoordinate2D 是否可见或最接近中心?
这可能会解决您的查询
MKMapPoint userPoint = MKMapPointForCoordinate(_mapView.userLocation.location.coordinate); MKMapRect mapRect = _mapView.visibleMapRect; BOOL inside = MKMapRectContainsPoint(mapRect, userPoint);