【发布时间】:2012-01-01 03:59:14
【问题描述】:
问题:
我的MKMapViewDelegate 的- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated 选择器在我在iPhone 5.0 模拟器中平移地图时从未被调用(但在缩放时被调用)。它可以在 4.3 模拟器和 4.3 设备上正常工作(或者至少我认为应该)。我目前无法访问 5.0 设备。
情况:
我有一个 MKMapView 实例(在 Interface Builder 中创建) - 我在 viewWillLoad 中仔细检查了它
- (void)viewDidLoad {
assert(self.myMapView);
[self.stopMapView setDelegate:self];
}
我进一步定义了MKMapViewDelegate 的一些选择器,但我关心的是:
- (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated
{
RKLogDebug(@"Will Change map longSpan: %lf", mapView.region.span.longitudeDelta);
}
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{
RKLogDebug(@"Did Change map longSpan: %lf", mapView.region.span.longitudeDelta);
}
这里发生了什么?在 iPhone 5.0 模拟器上时,委托人不会以某种方式了解 MKMapView 中的“平移”。我已经尝试重置模拟器内容但无济于事。我想知道这只是一些模拟器错误还是 iOS5 的预期行为? (我在 10.7.2 和 Xcode 4.2 上)。
【问题讨论】:
标签: ios ios5 ios-simulator mapkit