TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | ✗ |
Maintained by xtrinch.
Lets you choose multiple contacts from user’s address book. Returns selected contacts on button press to the designated delegated. Does not have a search functionality and colors cannot be edited, but I will be very happy to accept pull requests.
To run the example project, clone the repo, and run pod install
from the Example directory first.
import MRMultipleContactPicker
import UIKit
class ViewController: UIViewController, MRMultipleContactPickerDelegate {
@IBAction func showContactsTapped(sender: AnyObject) {
displayContactPicker()
}
func displayContactPicker() {
let podBundle = NSBundle(forClass: MRMultipleContactPickerController.self)
let bundleURL = podBundle.URLForResource("MRMultipleContactPicker", withExtension: "bundle")
let bundle = NSBundle(URL: bundleURL!)!
let s = UIStoryboard (
name: "Main", bundle: bundle
)
let vc = s.instantiateInitialViewController()!
(vc as! MRMultipleContactPickerController).delegate = self
(vc as! MRMultipleContactPickerController).titleText = "Choose"
self.presentViewController(vc, animated: true, completion: nil)
}
// MARK: MRMultipleContactPickerDelegate methods
func contactsSelected(people:[Person]) {
print(people)
}
}
MRMultipleContactPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MRMultipleContactPicker"
xTrinch, [email protected]
MRMultipleContactPicker is available under the MIT license. See the LICENSE file for more info.