我似乎无法弄清楚为什么这个函数不会触发
func locationManager(manager:CLLocationManager, didEnterRegion region:CLRegion) {
println("here")
var localNotification:UILocalNotification = UILocalNotification()
localNotification.alertAction = "Grab your bags "
UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
我认为这是在进入或离开受监控的区域时触发的,这是我如何监控我的区域
var wholeFoodsRegion = CLCircularRegion(center: wholeFoods, radius: CLLocationDistance(33.0), identifier:"wholeFoods")
然后将放入一个数组并进行监控
for(var i = 0; i < regions.count; i++){
locationManager.startMonitoringForRegion(regions[i])
}
我如何在进入某个地区时触发该功能