Skip to content

appus-studio/AppusContactPicker

Repository files navigation

AppusContactPicker

Made by Appus Studio

CI Status Version License Platform

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, hennadii.oleynik@appus.me, Appus Studio

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •