Condividi tramite


ABPersonAddressKey Classe

Definizione

NSDictionary chiavi da usare con ABPerson gli indirizzi.

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use the 'Contacts' API instead.")]
public static class ABPersonAddressKey
type ABPersonAddressKey = class
Ereditarietà
ABPersonAddressKey
Attributi

Commenti

Una singola NSDictionary istanza archivia un singolo indirizzo, con le chiavi e i valori del dizionario che contengono parti diverse dell'indirizzo:

// 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);

Proprietà

City

Rappresenta il valore associato alla costante kABPersonAddressCityKey

Country

Rappresenta il valore associato alla costante kABPersonAddressCountryKey

CountryCode

Rappresenta il valore associato alla costante kABPersonAddressCountryCodeKey

State

Rappresenta il valore associato alla costante kABPersonAddressStateKey

Street

Rappresenta il valore associato alla costante kABPersonAddressStreetKey

Zip

Rappresenta il valore associato alla costante kABPersonAddressZIPKey

Si applica a

Vedi anche