在tableView上显示数据:从选择器调用联系人到tableView 29并计算

时间:2016-01-24 20:59:17

标签: ios swift uitableview contact picker

Aaanyway,我想询问是否有可能从我的联系人选择器填充表格视图。我正在使用此库:https://github.com/ipraba/EPContactsPicker

这是我的选择:

///CONTACTS PICKER\\\

@IBAction func onTouchShowMeContactsButton(sender: AnyObject) {

    let contactPickerScene = EPContactsPicker(delegate: self, multiSelection:true, subtitleCellType: SubtitleCellValue.Email)
    let navigationController = UINavigationController(rootViewController: contactPickerScene)
    self.presentViewController(navigationController, animated: true, completion: nil)

}

//MARK: EPContactsPicker delegates
func epContactPicker(_: EPContactsPicker, didContactFetchFailed error : NSError)
{
    print("Failed with error \(error.description)")
}

func epContactPicker(_: EPContactsPicker, didSelectContact contact : EPContact)
{
    print("Contact \(contact.displayName()) has been selected")
}

func epContactPicker(_: EPContactsPicker, didCancel error : NSError)
{
    print("User canceled the selection");
}

func epContactPicker(_: EPContactsPicker, didSelectMultipleContacts contacts: [EPContact]) {
    print("The following contacts are selected")
    for contact in contacts {
        print("\(contact.displayName())")
    }

选择联系人后,我希望能够在表格视图中显示这些联系人:TableView

如果没有答案,或者你们因为我缺乏经验而认为我不配得到帮助,请通过某种形式的教程或某种相关的相关信息向我发送帮助。 感谢y'所有的时间和精力。 < 3

1 个答案:

答案 0 :(得分:0)

要从手机获取联系详细信息,您可以使用苹果库ABAddressBookRef

Please check the apple documentation