问题描述
我的团队正在尝试在iPad上为莲花笔记设计邮件客户端。在我们开始之前,我想知道是否有第三方自定义 MFMailComposeViewController
可用。它应该具有 To 字段,就像Three20 MessageComposeViewController
一样(电子邮件地址在圆形蓝框中输入)。我想要 Cc 和 BCc 一样。
不确定如何扩展Three20 MessageComposeViewController
添加 Cc , Bcc 并使用他们的委托方法向我的服务器发送电子邮件请求。
这是完全可行的。我之前已经将TTMessageController子类化了,并为其添加了一些图像视图,但根据我的经验,沿着那条路走下去并不明智。 TTMessageController确实不是为子类设计的。所以如果我再这样做,我会复制TTMessageController并直接编辑它。
我不知道任何提供这种UI的其他项目。你是否在该项目中使用Three20?然后TTMessageController可能是一个不错的选择。如果您不打算使用库的其余部分,请注意:TTMessageController在Three20中根深蒂固。撕掉它会很痛苦。从头开始重写可能会更容易。
关于如何可以将CC和BCC字段集成到TTMessageController的问题,如果没有这个问题很难回答一个具体的问题。我只能提供一些提示去哪里。
要启动收件人:字段是 TTMessageRecipientField
。您可以将该类的其他字段添加到MessageController。 TTMessageRecipientField
包含 TTPickerTextField
到合成。选择器文本字段是通过与数据源地址进行通信来真正完成工作的那个,它只是一个TTTableDataSource并显示蓝色气泡( TTPickerViewCell
)。 / p>
我希望这给你一个粗略的想法和一些代码来研究。
My team is trying to design a mail client for lotus notes on iPad. Before we start I want to know if there is a third party custom MFMailComposeViewController
available. It should have To field just like Three20 MessageComposeViewController
(with the email address entered in round blue box). I want the same for Cc and BCc.
Not sure how I could extend the Three20 MessageComposeViewController
to add Cc, Bcc and use their delegate methods to send email request to my server.
It is perfectly doable. I have subclassed TTMessageController before and added some image views to it, but from my experience it its not wise to go down that route. TTMessageController really isn't designed to be subclassed. So if I would do that again, I would copy TTMessageController and would edit it directly.
I don't know any other projects that provide this kind of UI. Are you using Three20 in that project anyways? Then TTMessageController might be a good fit. If you are not planning to use the rest of the library be warned: TTMessageController is quite deeply rooted in Three20. Ripping it out would be a pain. Rewriting from scratch might be easier.
About your question of how one could integrate CC and BCC fields into TTMessageController, that is hard to answer without a concrete question. I could only give some hints where to look.
To start the "To:" Field is a TTMessageRecipientField
. You might what to add additional fields of that class to the MessageController. A TTMessageRecipientField
contains a TTPickerTextField
through composition. The picker Text Field is the one that really does the work by communicating with the data Source of addresses, which simply is a TTTableDataSource and by displaying the blue bubbles (TTPickerViewCell
).
I hope that gives you an rough idea and some code to study.
这篇关于自定义邮件编写器就像Three20 Message Composer一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!