I understand that reverse geocoding takes a while to return values, but I do not understand how to get the values it returns at the proper time. I have a CLPlacemark property in the class that uses the geocoder, and in the geocoder completion manager I have the following line of code:
(I have verified that the values are indeed being passed from placemarks to placemark by using NSLog(@"%@", placemark.x) at the end of the completion handler.)
The problem that I am having is this: I am using placemark.locality and placemark.administrativeArea as part of an NSString property in a method that is called after the method with the reverse geocoding. Either the property placemark is loosing it's values (which I don't believe is the case), or the method after the geocoding method is finished executing before the reverse geocoding is finished.
What I need to know is how can I ensure that the NSString property isn't given null values by the placemark property, and that the locality and administrative area are given instead?
Code:
placemark = [placemarks objectAtIndex:0];
The problem that I am having is this: I am using placemark.locality and placemark.administrativeArea as part of an NSString property in a method that is called after the method with the reverse geocoding. Either the property placemark is loosing it's values (which I don't believe is the case), or the method after the geocoding method is finished executing before the reverse geocoding is finished.
What I need to know is how can I ensure that the NSString property isn't given null values by the placemark property, and that the locality and administrative area are given instead?