【发布时间】:2014-08-13 14:42:48
【问题描述】:
我正在实现基于位置的应用程序。在我的应用程序中,我使用以下方法。
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
-(void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading
以下是我在 ViewDidLoad 中的代码
- (void)viewDidLoad
{
[super viewDidLoad];
self.mapView.showsUserLocation = YES;
self.locationManager=[[CLLocationManager alloc] init];
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
self.locationManager.delegate=self;
[self.locationManager startUpdatingHeading];
}
这里我的问题是调用了 didUpdateHeading 方法,但没有调用 didUpdateLocations。我检查了是否有删除。谁能帮我解决这个问题?
【问题讨论】:
标签: mkmapview mapkit cllocationmanager ios7.1