我正在启动 GPS,然后将其保持打开状态并在应用程序中拨打电话openUrl
,然后再次返回应用程序并尝试通过调用停止 GPS,stopUpatingLocation
但 GPS 并没有停止。
请给出一些停止GPS的解决方案。
代码
app.locationManager.delegate=app;
[app.locationManager startMonitoringSignificantLocationChanges];
[app.locationManager startUpdatingLocation]; //start gps
然后使用代码调用 hangup [[UIApplication sharedApplication] tel:@"number"];
**Now after call hangup i need to stop that gps .... i have already written code below**
[app.locationManager stopMonitoringSignificantLocationChanges];
[app.locationManager stopUpdatingLocation];
app.locationManager=nil;
[app.locationManager release];
提前致谢