我正在使用一个重要的位置,但显示更新后,一个很长的distance.any线索,请分享。
在didfinishlaunching中,我开始进行重大更改,然后从locationmanager的didupdatelocation委托方法进行存储;
id locationValue = [launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey];
if(locationValue)
{NSLog(@"location value is%@",locationValue);
// create a new manager and start checking for sig changes
m_locManager = [[CLLocationManager alloc] init]
m_locManager.delegate = self;
[m_locManager startMonitoringSignificantLocationChanges];
//[m_locManager startUpdatingLocation];
[self.window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
[self showSplash];
return YES;发布于 2012-01-03 12:43:18
我不确定你的问题是什么,但我会告诉你一点关于startMonitoringSignificantLocationChanges的信息
当你使用startMonitoringSignificantLocationChanges时,你只会在切换手机发射塔时得到回调。因此,要测试它是否正常工作,您需要开车转一圈,或者使用调试器提供的位置更改功能。
https://stackoverflow.com/questions/7440531
复制相似问题