0
我在地圖上有許多針腳,我想知道其視圖的左上角和右下角的座標以執行特定操作。獲取具有自定義視圖的註釋的邊界
這裏是我需要插入的代碼獲得特定註釋視圖的邊界代碼:
- (void)mapView:(MapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view {
if ([view.annotation isKindOfClass:[PlaceAnnotation class]]) {
PlaceAnnotationView *placeAnnotationView = (PlaceAnnotationView *)view;
// How to get the bounds of placeAnnotationView here?
}
}
相關的問題:How to adjust region to fit custom annotation callout that have just appeared?