iOS 6 Map problems with MKUserTrackingModeFollowWithHeading

放肆的年华 提交于 2019-12-03 20:21:39

This is a bug in MapKit. It can be observed also in Apple Maps using MapKit such as the Find My Friends app. Note that the Apple Maps app is not using MapKit (at least not the same version) thus it's not affected by this bug.

I also do see sporadic EXC_BAD_ACCESS crashes in MapKit. In fact, MapKit related crashes account for the vast majority of my app's crashes. :(

I also noticed that MKUserTrackingModeFollowWithHeading works briefly and it changes to MKUserTrackingModeFollow almost immediately, especially at high zoom levels.

I tried

- (void)mapView:(MKMapView *)mapView didChangeUserTrackingMode:(MKUserTrackingMode)mode animated:(BOOL)animated {
    if (mapView.userTrackingMode != MKUserTrackingModeFollowWithHeading) {
        [mapView setUserTrackingMode:MKUserTrackingModeFollowWithHeading];
    }
}

but this creates a forever loop since right after I change to MKUserTrackingModeFollowWithHeading, something changes back to MKUserTrackingModeFollow. It's really annoying because I don't know what keeps changing the tracking mode to MKUserTrackingModeFollow.

Sorry that my answer was not useful, but I posted here to confirm the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!