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

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.

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type(异常:不应为错误类型创建SimpleTypeImpl)
Android IllegalArgumentException: The tag for fragment_XXX is invalid. Received: layout-sw600dp/fragment_XXX_0(Android IlLegalArgumentException:Fragment_XXX的标签无效。收到:Layout-sw600dp/Fragment_XXX_0)
iOS convert audio sample rate from 16 kHz to 8 kHz(IOS将音频采样率从16 kHz转换为8 kHz)
Enforcing an audio sampling rate in iOS(在iOS中强制音频采样率)
HTTPS request using volley(使用 volley 的 HTTPS 请求)