输入区域委托是否在输入时未触发

时间:2014-12-24 22:31:08

标签: ios swift delegates gps clregion

我似乎无法弄清楚为什么这个函数不会触发

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])
    }

我如何在进入某个地区时触发该功能

0 个答案:

没有答案