【问题标题】:Displaying data on a tableView: Calling contacts from a picker to tableView 29 and counting在tableView上显示数据:从picker调用联系人到tableView 29并计数
【发布时间】:2016-01-24 20:59:17
【问题描述】:

无论如何,我想问一下是否可以从我的联系人选择器中填充表格视图。我正在使用这个库: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

如果没有答案,或者如果你们认为我由于缺乏经验而不值得帮助,请通过某种教程或任何相关信息向我发送帮助。 感谢大家的时间和精力。

【问题讨论】:

    标签: ios swift uitableview contact picker


    【解决方案1】:

    要从手机获取联系方式,您可以使用苹果库,ABAddressBookRef

    Please check the apple documentation

    【讨论】:

    • 我会检查并报告给这个谢谢芽
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-15
    • 2012-01-04
    相关资源
    最近更新 更多