这是我的didEnterRegion
函数代码。问题是通知在进入和退出时触发。仅当用户输入位置时,我该怎么做才能触发通知?
func locationManager(manager: CLLocationManager!, didEnterRegion region: CLRegion!) {
var localNotification:UILocalNotification = UILocalNotification()
localNotification.alertBody = "you've entered rohini sector -8"
localNotification.region = region
UIApplication.sharedApplication().scheduleLocalNotification(localNotification)
NSLog("Entering region")
}