CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

AppusContactPicker 0.1.3

AppusContactPicker 0.1.3

TestsTested
LangLanguage Obj-CObjective C
License Custom
ReleasedLast Release Nov 2015

Maintained by Oleygen.



  • By
  • Hennadij

Demo

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Available for iOS 9.0 and higher

Installation

AppusContactPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "AppusContactPicker"

Usage

We did built in two kinds of views for usage

  1. ContactPickerTagsView

Add UIScrollView to your storyboard. Set custom class as "ContactPickerTagsView".

Add #import "ContactPickerTagsView.h" to your ViewController class. Drag outlet to your ViewControllerClass. Component is ready for use.

@property (weak, nonatomic) IBOutlet ContactPickerTagsView *contactPickerTagsView;

You can set colors of tags using TagViewStyle class.

    TagViewStyle *style = [[TagViewStyle alloc] init];
    style.borderColor = [UIColor grayColor];
    style.backgroundColor = [UIColor clearColor];
    style.textColor = [UIColor blackColor];
    style.deleteColor = [UIColor redColor];
    self.contactPickerTagsView.tagViewStyle = style;

To show contacts you can call

    [self.contactPickerTagsView showContactViewController];

When you did choose any phone number just tap on it and it will be added to your contactPickerTagsView. You can add contacts manually using Recipient.h class instances

    Recipient *recipient = [[Recipient alloc] init];
    recipient.phoneNumber = @"555-44-550";
    [self.contactPickerTagsView addRecipient:recipient];

NOTE: recipients with equal numbers won't be added.

All your data stores in

self.contactPickerTagsView.recipients

You can type number manually. ContactPickerTagsView support autocompletion. If numbers which you did enter match phone numbers in your contacts book you will see popup table with available contacts.

  1. ContactPickerTableView

Add UITableView to your storyboard. Set custom class as "ContactPickerTableView".

Add #import "ContactPickerTableView.h" to your ViewController class. Drag outlet to your ViewControllerClass. Component is ready for use.

    @property (weak, nonatomic) IBOutlet ContactPickerTableView *contactPickerTableView;

To show contacts you can call

    [self.contactPickerTagsView showContactViewController];

When you did choose any phone number just tap on it and it will be added to your contactPickerTagsView.

You can add contacts manually using Recipient.h class instances

    Recipient *recipient = [[Recipient alloc] init];
    recipient.phoneNumber = @"555-44-550";
    [self.contactPickerTableView addRecipient:recipient];

NOTE: recipients with equal numbers won't be added.

All your data stores in

self.contactPickerTableView.recipients

Author

Hennadij, [email protected]

License

AppusContactPicker is available under the Apache License. See the LICENSE file for more info.