-2
我開始使用GPS,然後保持開啓狀態,並使用openUrl
在應用程序內撥打電話,然後再次返回到應用程序並嘗試通過撥打stopUpatingLocation
來停止該GPS,但GPS並未停止。locationmanger不會停止
請給一些解決方案來停止GPS。
代碼
app.locationManager.delegate=app;
[app.locationManager startMonitoringSignificantLocationChanges];
[app.locationManager startUpdatingLocation]; //start gps
然後提前使用代碼[[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];
感謝來電掛斷
請添加相關代碼,我們不禁無需提供任何關於您的代碼的信息 –
您能告訴我們您的代碼嗎? – Raptor
app.locationManager.delegate = app; [app.locationManager startMonitoringSignificantLocationChanges]; [app.locationManager startUpdatingLocation]; //啓動gps然後使用代碼調用hangup [[UIApplication sharedApplication] tel:@「number」]; – user1258592