在MFMailComposeViewController中访问收件人,正文等 [英] Accessing recipients, body etc in an MFMailComposeViewController
问题描述
我目前正在努力在启动过程中保持iPhone应用程序的UI状态,但是事实证明,在我的一个控制器(子类
I'm currently working on persisting the UI state of my iPhone app across launches, but it's proving to be a bit of an issue in one of my controllers - a sub-classed MFMailComposeViewController
.
从本质上讲,我需要存储(在应用程序退出时)当前的To/CC/BCC列表,主题和正文,以便在重新启动后可以再次设置视图.不幸的是,Apple似乎只为这些数据提供了setter方法(例如setToRecipients:
).
Essentially, I need to store (on app exit) the current To/CC/BCC lists, the subject, and the body so I can set the view up again after a relaunch. Unfortunately, Apple seems to have only provided setter methods for this data (e.g. setToRecipients:
).
毫无疑问,那里有一些私人吸气剂,但我宁愿冒险被App Store批准者拒之门外...
No doubt there's some private getters in there somewhere, but I'd rather not risk getting bounced by the App Store approvers...
有什么想法/建议吗?
Any thoughts/suggestions?
推荐答案
最好的选择是使用controller.view
,并在子视图层次结构中搜索所有UILabel
.
The best bet is to use controller.view
, and search for all UILabel
s in the subview hierarchy.
(此外,MFMailComposeViewController
没有专用的获取器.这些设置器仅将消息委派给其内部实现类.)
(Also, there aren't private getters for MFMailComposeViewController
. Those setters only delegates the message to its internal implementation class.)
这篇关于在MFMailComposeViewController中访问收件人,正文等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!