开发者

Get contents of TTMessageRecipientField (TTMessageController)

开发者 https://www.devze.com 2023-03-23 19:14 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消