共用方式為


ABPersonAddressKey 類別

定義

NSDictionary 用於位址的 ABPerson 索引鍵。

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.None, "Use the 'Contacts' API instead.")]
public static class ABPersonAddressKey
type ABPersonAddressKey = class
繼承
ABPersonAddressKey
屬性

備註

NSDictionary 一實例會儲存單一位址,其中包含保存位址不同部分的字典索引鍵和值:

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

屬性

City

表示與常數 kABPersonAddressCityKey 相關聯的值

Country

表示與常數 kABPersonAddressCountryKey 相關聯的值

CountryCode

表示與常數 kABPersonAddressCountryCodeKey 相關聯的值

State

表示與常數 kABPersonAddressStateKey 相關聯的值

Street

表示與常數 kABPersonAddressStreetKey 相關聯的值

Zip

表示與常數 kABPersonAddressZIPKey 相關聯的值

適用於

另請參閱