今天我得到了一个错误的解释:)只有一个问题:我不理解它:(那么当我得到这个错误时,我做错了什么?
2012-04-30 03:04:35.737 Barz[21961:11903] An instance 0x7491960 of class BarAnnotation was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
<NSKeyValueObservationInfo 0x74a18b0> (
<NSKeyValueObservance 0x74a1700: Observer: 0x747f2b0, Key path: coordinate, Options: <New: NO, Old: NO, Prior: YES> Context: 0x0, Property: 0x74a11c0>
)
不是说我没有手动添加任何观察者,我只是在方法viewWillAppear中删除"BarAnnotation“(我的自定义MKAnnotation)并将其添加到我的mapView中?我也不太确定我是否理解了谁在观察谁:我的mapView正在观察所有的MKAnnotations吗?或者是我的mapViewController (== mapView的代理)在观察?如果我禁用了拖拽,为什么它会这样呢?
希望有人能帮助我回答这些问题:)
发布于 2012-07-14 10:41:29
我见过当注释的坐标无效时就会发生这种情况。你检查过了吗?
https://stackoverflow.com/questions/10377508
复制相似问题