I use the TTMessageController from Three20 to display a view that is similar to the iPhone SMS application containing a recipient picker.
Currently I am able to autosearch contacts and to browse them by clicking on the + button:
However I have a problem to apply the selected contact to the recipient field. TTMessageController implements the addRecipient method but I am not sure how to use it.
In my controller class that extends TTMessageController I have following method which is triggered when a contact is selected, so addRecipient has to go here somewhere:
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person{
//dismiss the contact selector
[self dismissModalViewControllerAnimated:NO];
return NO;
}
Any idea how to add the recipient in that method?