問題描述
目前是否可以創建一個在我上班時提醒我,Siri"的應用程序?還是需要運行應用才能應用地理圍欄?
Is it currently possible to create an app that "reminds me when I get to work, Siri" right now ? Or the app needs to be running to apply geofencing ?
推薦答案
是的,可以通過使用 CLLocationManager 的 startMonitoringForRegion當進入/離開某個圍欄"地理區域時,它將調用您的應用程序.
Yes, it is possible by using the CLLocationManager's startMonitoringForRegion which will call your App when entered/left a certain "fenced" geo-area.
但是因為用戶的位置被/將被使用,只要這個調用被取消(通過匹配的 stopMonitoringForRegion),位置圖標就會出現
BUT since the user's location is/will be used, the location icon will appear for as long as this call has yet been canceled (by the matching stopMonitoringForRegion)
(在 iOS6 上,此圖標將被替換為區域"位置的不同位置圖標,而不是常規位置使用 - 看起來像當前圖標的輪廓)
(on iOS6 this icon will be replaced with a different location icon for "regional" location instead of regular location use - looks like an outline of the current icon)
這篇關于iOS 5 中來自后臺地理圍欄的通知?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!