开发者

How to keep get location info and add to mapview when iphone in screensaving mode

开发者 https://www.devze.com 2023-02-02 11:02 出处:网络
I am using - (void)locationManager:(CLLocationManager *)manager didUpda开发者_开发技巧teToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation

I am using

- (void)locationManager:(CLLocationManager *)manager didUpda开发者_开发技巧teToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 

to keep receiving location information, then add annotation to MKMapView. It appears that it stop updating when iPhone screen in screen saving mode.


Could you turn off the screensaving mode? You can do so by calling: [UIApplication sharedApplication].idleTimerDisabled = YES; This should solve your problem.

0

精彩评论

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