/UIToField

Drag and drop classes to mimic Apple's To: field functionality

Primary LanguageObjective-C

UIToField

UIToField is a complete re write of Joe Michels' Multi Recipient Picker Control . I enhanced it to further mimic Apple's To: field, made it easier to include in exisiting projects, and provided easier ways to implement your own data source for the field.

Matt Gallagher's ShadowedTableView is also used in this project.

How to add UIToField to your project

1. Copy all the files from the UIToFieldSupport folder o your project.

2. Import RecipientController.h in your view controller's .h file

3. Create your data model object by implementig the DataMModelDelegate protocol (examples in ArrayDataModel and CoreDataModel)

4. Create the instance variable and property for the recipientController in your view controller's .h file

5. @synthesize the property in your .m file andinitialize it in your init method, setting the model variable accordingly (with your own data model)

6. Release the variable in your dealloc method

7. Add the reciepientController's view in your viewDidLoad method

8. Resign first responder for the recipientController's entry field where appropriate (in the example I resign it in the view controller's touchesBegan method)

9. Retrieve the added recipients where appropriate (in the example I retrieve them in the showRecipients method)

10. Enjoy UIToField!