Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Contacts Picker/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import Contacts

class ViewController: UIViewController, EPPickerDelegate {

Expand All @@ -22,7 +23,8 @@ class ViewController: UIViewController, EPPickerDelegate {

@IBAction func onTouchShowMeContactsButton(_ sender: AnyObject) {

let contactPickerScene = EPContactsPicker(delegate: self, multiSelection:true, subtitleCellType: SubtitleCellValue.email)
// let contactPickerScene = EPContactsPicker(delegate: self, multiSelection:true, subtitleCellType: SubtitleCellValue.phoneNumber)
let contactPickerScene = EPContactsPicker(delegate: self, multiSelection: true, multiSelectionLimit: 2)
let navigationController = UINavigationController(rootViewController: contactPickerScene)
self.present(navigationController, animated: true, completion: nil)

Expand Down Expand Up @@ -50,5 +52,9 @@ class ViewController: UIViewController, EPPickerDelegate {
print("\(contact.displayName())")
}
}

func epContactPicker(_: EPContactsPicker, shouldAddContact contact: EPContact) -> Bool {
return contact.hasPhoneNumbers()
}

}
8 changes: 8 additions & 0 deletions Pods/EPContact.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 66 additions & 23 deletions Pods/EPContactsPicker.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.