Iphone 停止位置更新并再次启动后未调用didUpdateToLocation
我有一个搜索当前位置的场景。一旦当前位置搜索开始,我使用“startMonitoringSignificantLocationChanges”调用didUpdateToLocation委托,并获得位置值 搜索结束后,我使用“stopMonitoringSignificantLocationChanges”关闭GPS 我的问题是,我可能会在一段时间后进行超现实位置搜索,当搜索完成时,也就是说,在GPS打开但未调用“didUpdateToLocation”后,我再次开始搜索当前位置 我在视图控制器中执行所有这些操作 我已初始化位置管理器,并已将所需的精度设置为“KCallocationAccuracyNearesttenmeters”,将距离过滤器设置为“10.0f” 为什么我不能调用“didUpdateToLocation”委托来完成位置更新并再次启动它 请任何人帮助我 期待你们中的任何一个人的积极回应Iphone 停止位置更新并再次启动后未调用didUpdateToLocation,iphone,cllocationmanager,Iphone,Cllocationmanager,我有一个搜索当前位置的场景。一旦当前位置搜索开始,我使用“startMonitoringSignificantLocationChanges”调用didUpdateToLocation委托,并获得位置值 搜索结束后,我使用“stopMonitoringSignificantLocationChanges”关闭GPS 我的问题是,我可能会在一段时间后进行超现实位置搜索,当搜索完成时,也就是说,在GPS打开但未调用“didUpdateToLocation”后,我再次开始搜索当前位置 我在视图控制器中
谢谢。您应该使用StartupDating位置,而不是StartMonitoring重要位置更改。startMonitoringSignificantLocationChanges仅在位置发生显著更改时调用didUpdateToLocation
if (locationManager == nill)
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters;
locationManager.distanceFilter = 10;
[locationManager startUpdatingLocation];