Compartilhar via


ABPersonAddressKey Classe

Definição

NSDictionary chaves para uso com ABPerson endereços.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use the 'Contacts' API instead.")]
public static class ABPersonAddressKey
type ABPersonAddressKey = class
Herança
ABPersonAddressKey
Atributos

Comentários

Uma única NSDictionary instância armazena um único endereço, com as chaves de dicionário e os valores que contêm diferentes partes do endereço:

// Address from: https://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);

Propriedades

City

Representa o valor associado à constante kABPersonAddressCityKey

Country

Representa o valor associado à constante kABPersonAddressCountryKey

CountryCode

Representa o valor associado à constante kABPersonAddressCountryCodeKey

State

Representa o valor associado à constante kABPersonAddressStateKey

Street

Representa o valor associado à constante kABPersonAddressStreetKey

Zip

Representa o valor associado à constante kABPersonAddressZIPKey

Aplica-se a

Confira também