获取具有自定义视图的注释范围

时间:2012-11-02 21:22:20

标签: ios annotations mapkit mkannotationview

我的地图上有很多针脚,我想知道他们视图的左上角和右下角的坐标,以便对它们进行特定的操作。

以下是我需要插入获取特定注释视图边界的代码的代码:

- (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?

1 个答案:

答案 0 :(得分:0)

我刚刚发布了这个问题的答案。答案可以在那里找到:How to adjust region to fit custom annotation callout that have just appeared?