I got the longitude and latitude values and i saved it in a label and it was easily displayed in my application but i want the current location details, mainly the name of the place.
I used MKReverseGeocoder. i did this code
- (void)locationUpdate:(CLLocation *)location
{
CLLocationCoordinate2D coord;
coord.longitude=[NSString stringWithFormat:@"LATITUDE: %f", location.coordinate.latitude];
MKReverseGeocoder *geocoder=[[MKReverseGeocoder alloc]initWithCoordinate:coord];
[geocoder setDelegate:self];
[geocoder start];
latlbl.text = [NSString stringWithFormat:@"LATITUDE: %f", location.coordinate.latitude];
lonlbl.text = [NSString stringWithFormat:@"LONGITUDE: %f", location.coordinate.longitude];
//txtlocate.text = [location description];
}
![-(void)reverseGeocoder:(MKReverseGeocoder)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"%@",\[placemark addressDictionary\]
}
this is the error what i'm getting...
thank in advance