为了以防万一,我发现苹果的iOS文档是错误的,因为XCode 6.1不支持removeRecord方法,导致标题错误
这不起作用
var adbk: ABAddressBook! //then assign it in some other code
var newContact: ABRecord //then create it in some other code
var success:Bool = adbk.removeRecord(newContact) //this does not work - results in the title error这是在Swift中从地址簿中删除记录的解决方案:
var adbk: ABAddressBook! //then assign it in some other code
var newContact: ABRecord //then create it in some other code
var error: Unmanaged<CFErrorRef>? = nil
var success = ABAddressBookRemoveRecord(adbk, newContact, &error)发布于 2014-11-10 08:09:19
这是在Swift中从地址簿中删除记录的解决方案:
var adbk: ABAddressBook! //then assign it in some other code
var newContact: ABRecord //then create it in some other code
var error: Unmanaged<CFErrorRef>? = nil
var success = ABAddressBookRemoveRecord(adbk, newContact, &error)https://stackoverflow.com/questions/26834882
复制相似问题