- (void)viewWillAppear:(BOOL)animated
{
MKUserTrackingBarButtonItem *trackingBarButtonItem = [[MKUserTrackingBarButtonItem alloc]initWithMapView:_mapView];
NSArray *barButtonItems = [NSArray arrayWithObjects:trackingBarButtonItem, nil];
mapToolbar.items = barButtonItems;
...
}
代码在iPhone上运行正常,但在iPad上卸载视图时出现错误:
Cannot remove an observer <MKUserTrackingBarButtonItem 0x9cc0930> for the key path
"controlSize" from <UIButton 0x991b420> because it is not registered as an observer.'
答案 0 :(得分:0)
我联系了Apple DTS,答案是:
“据我所知,目前的发货SDK没有解决方法。我会查看最新的iOS SDK测试版,看看这是否还是个问题。”