I use the TTMessageController in my project.
The user can auto search or pick a contact from his address book so that I can retrieve the recipients from开发者_开发知识库 TTMessageRecipientField as NSArray.
However when the user provides a contact that is not in his address book the NSArray "recipients" is empty (e.g. when he just types in a contact instead of picking it from address book).
Is there a way to get just the contant string from TTMessageController?
After having a closer look at the TTMessageController class I found a solution.
In your TTMessageController subclass use following method
[self textForFieldAtIndex:0]
returns the string value of the recipient text field.
精彩评论