【发布时间】:2012-01-11 03:30:11
【问题描述】:
当应用程序进入后台时,如何获取 CLLocationManager 委托方法,
我是CLLocationManager的新手
实际上,当应用程序在前台运行时,我的应用程序会调用 CLLocationmanager dalegate 方法,但当应用程序进入后台时,这些方法不会被调用。
通过使用
[locationManager startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest];
让我的应用程序调用这些方法
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
NSLog(@"Entered Region");
}
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
NSLog(@"Exited Region");
}
如何在appDelegate 类中使用CLLocationmanagerdelegate?
【问题讨论】:
标签: iphone objective-c cocoa-touch ios4 core-location