Latest 2.0.2
Homepage https://github.com/vdeep/VDContactPicker
License MIT
Platforms ios 9.0, requires ARC
Frameworks Contacts, ContactsUI
Authors

VDContactPicker

A contacts picker component using Apple’s Contacts framework.

Platform
Swift 4.1
CocoaPods Compatible
Carthage compatible
CI Status
License
Twitter: @VishalDeep

This library was originally forked from JFContactsPicker

Preview

Single SelectionMulti Selection

Installation

CocoaPods

VDContactPicker is available on CocoaPods. Just add the following to your project Podfile:

pod 'VDContactPicker', '~> 1.0'

Manual Installation

Just drag and drop the Source folder into your project

Requirements

  • iOS9+
  • Swift 4.1
  • ARC

For manual installation you may need to add these frameworks in your Build Phases:
ContactsUI.framework and Contacts.framework.

Features

VDContactPicker provides all common functionality and customization features:

[x] Single selection and multi-selection options.
[x] Search Contacts
[x] Configure the contact data to be shown. (Phone Number, Email, Birthday, or Organization)
[x] Section indexes to easily navigate through the contacts.
[x] Shows initials when image is not available.
[x] Contact object to get the properties of the contacts

If you would like additional support for additional customization features, please Create a New Issue.

Initialization

Initialize the picker by passing the delegate, multiselection option, and the secondary data type to be displayed (Phone Number, Email, Birthday, or Organization).

let contactPicker = VDContactPicker(delegate: self, multiSelection:false, subtitleCellType: .email)
let navigationController = UINavigationController(rootViewController: contactPicker)
self.present(navigationController, animated: true, completion: nil)

Delegates

VDContactPicker provides you four delegate methods for responding to the picker’s events.

func contactPicker(_ contactPicker: VDContactsPicker, didContactFetchFailed error : NSError)
func contactPicker(_ contactPicker: VDContactsPicker, didCancel error : NSError)
func contactPicker(_ contactPicker: VDContactsPicker, didSelectContact contact : VDContact)
func contactPicker(_ contactPicker: VDContactsPicker, didSelectMultipleContacts contacts : [VDContact])

Contact Object

The VDContact object provides you the properties of a contact. This contains properties like displayName, initials, firstName, lastName, company, birthday, etc.

License

VDContactPicker is available under the MIT license. See the LICENSE file for more info.

Contributors

@vdeep

Original Authors
@JettF
@AnthonyMDev
@ipraba
@Sorix

Latest podspec

{
    "name": "VDContactPicker",
    "module_name": "VDContactPicker",
    "version": "2.0.2",
    "summary": "A contacts picker component for iOS written in swift using new contacts framwork. Based on 'JFContactPicker'.",
    "description": "Featuresn[x] Single selection and multi-selection options.n[x] Search Contactsn[x] Configure the contact data to be shown. (Phone Number, Email, Birthday, or Organization)n[x] Section indexes to easily navigate through the contacts.n[x] Shows initials when image is not available.n[x] Contact object to get the properties of the contacts",
    "homepage": "https://github.com/vdeep/VDContactPicker",
    "license": "MIT",
    "authors": {
        "Vishal Deep": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vdeep/VDContactPicker.git",
        "tag": "2.0.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "frameworks": [
        "Contacts",
        "ContactsUI"
    ],
    "source_files": "Source",
    "resource_bundles": {
        "VDContactPicker": [
            "Assets/*.xib"
        ]
    },
    "swift_version": "4.1"
}

Pin It on Pinterest

Share This