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