How to keep get location info and add to mapview when iphone in screensaving mode
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.
精彩评论