Trying to get formatted address from AddressDictionary, that I got from CLGeocoder.
Used following code with no result:
subtitle = [NSString stringWithString:[[addressDict objectForKey:@"FormattedAddressLines"]objectAtIndex:0]];
Also tried:
subtitle = [[[ABAddressBook sharedAddressBook] formattedAddressFromDictionary:placemark.addressDictionary] string];
but this code seems working on Mac OS X only.
Compiler asks about ABAdressBook, but I have both header files imported.
#import <AddressBook/ABAddressBook.h>
#import <AddressBook/AddressBook.h>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…