iPhoneで緯度と経度を取得します。しかし、その緯度と経度に基づいて住所を見つけたいと思っています。Ios5を使用しています。Find Address のソースコードを教えてください。このコード .m ファイルを使用しました
MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:Coordinate2D];
[geocoder setDelegate:self];
[geocoder start]; // put in vievdidload
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"The geocoder has returned: %@", [placemark country]);
}
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error
{
NSLog(@"Error");
}
しかし、それはメッセージエラーを出します。