【发布时间】:2011-08-23 22:28:43
【问题描述】:
我在一段相对简单的代码中得到了令人讨厌的 EXC_BAD_ACCESS。有谁知道为什么这段代码会崩溃?
stack:
_remove ()
-[MKQuadTrie remove:] ()
-[MKAnnotationContainerView removeAnnotation:] ()
-[MKMapView(UserPositioningInternal) removeUserLocation] ()
-[MKMapView(UserPositioning) stopUpdatingUserLocation] ()
-[MKMapView setShowsUserLocation:] ()
-[MapViewController stopTrackingLocation]
code:
- (void)stopTrackingLocation
{
if (mapView.showsUserLocation)
{
// Crashes here
mapView.showsUserLocation = NO;
}
}
【问题讨论】:
-
您找到解决此问题的方法了吗?我有同样的问题。
-
如果这个堆栈跟踪是完整的而不是缩写的,它将更加有用。很多人搜索确切的崩溃文本。
标签: ios mapkit exc-bad-access