Function

ABCreateStringWithAddressDictionary

Returns a formatted address from an address property.

Declaration

NSString * ABCreateStringWithAddressDictionary(NSDictionary *address, BOOL addCountryName);

Parameters

address

A dictionary representing the address property to format.

addCountryName

Specifies whether to include the name of the country in the returned formatted address.

When NO and address includes a country name, that country name is still included in the return value.

When YES and address doesn’t include a country name, the country name is added to the return value. (The country name is generated from the country code entry in address; see Address Property.)

Return Value

The formatted address (may include line endings).

Discussion

The address is formatted based on the address's country code (kABPersonAddressCountryCodeKey). In general, the country code should be set to correspond with the country name (kABPersonAddressCountryKey).

See Also

Detail Display

ABNewPersonViewController

A view controller presenting an interface to create a contact.

Deprecated
ABPersonViewController

The ABPersonViewController class (whose instances are known as person view controllers) implements the view used to display a person record (ABPersonRef).

Deprecated
ABUnknownPersonViewController

The ABUnknownPersonViewController class (whose instances are known as unknown-person view controllers) implements a view controller used to create a person record from a set of person properties.

Deprecated