0
我正在通过天气应用教程工作。我无法获取该位置的反向地理编码。它不断收到标题中的错误。我知道它告诉我只是坚持如何解决它。将'CLLocationManager *'发送给不兼容类型'CLLocationCoordinate2D'的参数;
继承人的代码片段:
if (1)
{
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:locationManager];
geocoder.delegate = self;
[geocoder start];
}
else
{
[self performSelectorInBackground:@selector(showWeatherFor:) withObject:@"95014"];
}
就像我说的,我还在学习,以便一个解释是,为什么你做,你做了什么漂亮。
如何调用位置获取器? – heinst
我以为我开始得到的位置与“startUpdatingLocation” – heinst