开发者

MKMapView showsuserlocation

In my app I have a rare bug that stops showing the userlocation. If I tone the app down and just have the map, and set everything up in the viewDidLoad, and at the end do the typical:

myMapView.showsUserLocation = YES;

everything works great 99% of the time. It always works when t开发者_高级运维he App is starting from scratch, but like 1 time out of 100, when resuming from the background, the userlocation doesn't show. And even if I make a button to turn showsUserLocation back on, it still won't show (and upon doing NSLog's the property shows that it is set to YES in the MKMapView). If I kill the program, and start it again, it works fine again.

Everything is being done in the main thread as well.

Anyone encounter anything like this?


you can refer this image for fetch location in backgroud Mode

MKMapView showsuserlocation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜