位置服务指示灯保持“开启"状态

Locationservice Indicator stays quot;onquot;(位置服务指示灯保持“开启状态)

本文介绍了位置服务指示灯保持“开启"状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个在 iPhone 上使用定位服务的小应用程序.一切都很好,除了有时,即使我明确杀死应用程序,信息栏中的小箭头也会保持活动状态.我对定位服务使用后台模式,因此实现了 appDelegate 方法 applicationWillResignActiveapplicationDidEnterBackgroundapplicationWillEnterForegroundapplicationDidBecomeActive,但是不要触摸位置服务(嗯 - 我需要它们在后台模式下).

I have a created a small app which uses location services on the iPhone. All works well, except the fact, that sometimes, the small arrow in the info-bar stays active even if I explicitly kill the app. I use the background mode for locationservices, thus the appDelegate methods applicationWillResignActive, applicationDidEnterBackground, applicationWillEnterForeground and applicationDidBecomeActive are implemented but do not touch the location services (well - I need them in background mode).

在那个配置中 applicationWillTerminate 永远不会被调用;我在 dealloc 中将所有清理清理实现为 stopUpdatingLocation,因为我没有找到任何其他适合此的地方.但仍然 - 指示灯一直亮着.

In that configuration applicationWillTerminate is never called; I implemented all the cleanup cleanup as stopUpdatingLocation in dealloc, as I did not find any other place appropriate for this. But still - the indicator stays on.

有什么想法吗?

推荐答案

好的,问题解决了.指示灯将一直亮着,直到找到新位置.然后,如果其他一切都正确,则指示灯将关闭.

Ok, problem solved. The indicator will stay on until a new location is found. Then if everything else is correct, the indicator turns off.

这篇关于位置服务指示灯保持“开启"状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:位置服务指示灯保持“开启"状态

基础教程推荐