MonoTouch.AddressBook.ABPersonAddressKey Class
MonoTouch.Foundation.NSDictionary keys for use with MonoTouch.AddressBook.ABPerson addresses.

See Also: ABPersonAddressKey Members

Syntax

public static class ABPersonAddressKey

See Also

ABPerson.GetAddresses
ABPerson.SetAddresses(ABMultiValue<MonoTouch.Foundation.NSDictionary>)

Remarks

A single MonoTouch.Foundation.NSDictionary instance stores a single address, with the dictionary keys and values holding different parts of the address:

C# Example

// Address from: http://en.wikipedia.org/wiki/Address_(geography)#United_States
NSDictionary address = NSDictionary.FromObjectsAndKeys(
    new NSObject[]{
        new NSString("455 Larkspur Dr."),
        new NSString("California Springs"),
        new NSString("CA"),
        new NSString("92926"),
        new NSString("USA"),
        new NSString("us"),
    },
    new NSObject[]{
        ABPersonAddressKey.Street,
        ABPersonAddressKey.City,
        ABPersonAddressKey.State,
        ABPersonAddressKey.Zip,
        ABPersonAddressKey.Country,
        ABPersonAddressKey.CountryCode,
    }
);
ABMutableDictionaryMultiValue addresses = new ABMutableDictionaryMultiValue() {
  { address, ABLabel.Home },
};
ABPerson person = GetMeSomePerson();
person.SetAddresses(addresses);

Requirements

Namespace: MonoTouch.AddressBook
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0