Contacts(CNLabeledValue)

CNLabeledValue是线程安全的,用于记录联系人内的多维数据,如电话、家庭地址、邮件等。

1 Setting Identifiers

/// 唯一标示符
public var identifier: String { get }
/// 初始化
public init(label: String?, value: protocol<NSCopying, NSSecureCoding>)

2 Setting Labels and Values

/// 设置label,返回新CNLabeledValue
public func labeledValueBySettingLabel(label: String?) -> Self

/// 设置value,返回新CNLabeledValue
public func labeledValueBySettingValue(value: protocol<NSCopying, NSSecureCoding>) -> Self

/// 设置label和value,返回新CNLabeledValue
public func labeledValueBySettingLabel(label: String?, value: protocol<NSCopying, NSSecureCoding>) -> Self

3 Labels and Values

///
public var label: String { get }
///
@NSCopying public var value: protocol<NSCopying, NSSecureCoding> { get }

4 Localization

/// 格式化label获取本地描述
public class func localizedStringForLabel(label: String) -> String

 

Appendix

Sample Code

Swift

Contacts Framework Reference

CNLabeledValue Class Reference

Revision History

时间 描述
2016-01-14 博文完成

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/937447974/Blog

你可能感兴趣的:(Contacts(CNLabeledValue))