MKReverseGeoCoder API を使用して、座標に基づいて都市名を取得しようとしています。何らかの理由でデリゲートが呼び出されません。なぜアイデアはありますか?コードは次のとおりです。
- (void)startReverseLookup
{
[reverseCoordinateInfo initWithCoordinate:self.currentlocation.coordinate];
[reverseCoordinateInfo setDelegate:self];
[reverseCoordinateInfo start];
NSLog(@"Reverse Geocode started");
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error
{
NSLog(@"RC - ERROR !!!");
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"RC lookup finished !! - Locality is:%@",placemark.locality);
}
.h ファイルでプロトコルを宣言してから、startReverseLookup を呼び出します。最初の NSLog が表示されますが、その後は何も起こりません。ただ永遠にそこにとどまり、どちらのメソッドでもデリゲートが呼び出されることはありません。助言がありますか?