看到一段代码获取用户位置,运行正常可以显示正确地址。
但是现在想在文本框中显示邮政编码。怎么显示?
- (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;
}
我的代码没有用。。