So I looked at the sample code by Apple for getting the users location. This works fine for me and the location its display is correct.
Now I want to display the zipcode in a textfield called “zipCode” that I have created. How would I do that?
tryed:
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations {
CLLocation *location = [locations objectAtIndex:0];
NSLog(@"lat%f - lon%f", location.coordinate.latitude, location.coordinate.longitude);
zipCode.text = self.placemark.postalCode;
}
But that didn’t work.
You need to use reverseGeocodeLocation, like:
Remember to import the CoreLocation.framework