如何使用ContactFrameworkiOS9添加多个电话号码CNMutableContact*contact=[testmutableCopy];CNLabeledValue*homePhone_1=[CNLabeledValuelabeledValueWithLabel:CNLabelHomevalue:[CNPhoneNumberphoneNumberWithStringValue:@"019312-555-1212"]];CNLabeledValue*homePhone_2=[CNLabeledValuelabeledValueWithLabel:CNLabelHomeval
很快..我有这段代码可以添加新联系人,它一直有效,直到将我的代码转换为Swift3,现在它接受除电子邮件之外的所有属性,我收到两个错误:1-Argumenttype'String?'doesnotconformtoexpectedtype'NSCopying'2-Argumenttype'String?'doesnotconformtoexpectedtype'NSSecureCoding'这是我尝试向联系人添加电子邮件时的代码:letworkEmail=CNLabeledValue(label:"WorkEmail",value:emp.getEmail())contact.emai
很快..我有这段代码可以添加新联系人,它一直有效,直到将我的代码转换为Swift3,现在它接受除电子邮件之外的所有属性,我收到两个错误:1-Argumenttype'String?'doesnotconformtoexpectedtype'NSCopying'2-Argumenttype'String?'doesnotconformtoexpectedtype'NSSecureCoding'这是我尝试向联系人添加电子邮件时的代码:letworkEmail=CNLabeledValue(label:"WorkEmail",value:emp.getEmail())contact.emai
在swift2中,我正在使用CNLabeledValue.localizedStringForLabel(phoneNumber.label)并且工作正常。在swift3中,我尝试了这一行CNLabeledValue.localizedString(forLabel:phoneNumber.label!)但得到了genericparameter'ValueType'couldnotbeinferred错误如何在swift3中获取CNLabeledValue的本地化字符串? 最佳答案 在Swift3中,CNLabeledValue声明