我试图得到ISO 国家代码CLPlacemark 对象中的“en_US”之类的语言环境。当我对对象执行 NSLog 时,我会收到很多文本,包括:
address = {
"localized_address" = (
{
address = {
formattedAddressLine = (
"Piccadilly Circus",
"Coventry Street",
London,
W1J,
England
);
structuredAddress = {
administrativeArea = England;
areaOfInterest = (
"Piccadilly Circus",
"Great Britain"
);
country = "United Kingdom";
countryCode = GB;
dependentLocality = (
Mayfair
);
fullThoroughfare = "Coventry Street";
geoId = (
);
locality = London;
postCode = W1J;
subAdministrativeArea = London;
subLocality = Mayfair;
thoroughfare = "Coventry Street";
};
};
locale = "en_US";
你可以在最后一行看到我需要的信息。但我不知道如何直接访问这些信息。
当我尝试访问 CLPlacemark 的 ISOcountryCode 属性时,我只得到 GB。
感谢您的帮助伯恩哈德