Accessing recipients, body etc in an MFMailComposeViewController
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 MFMailCompo开发者_StackOverflowseViewController
.
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:
).
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?
The best bet is to use controller.view
, and search for all UILabel
s in the subview hierarchy.
(Also, there aren't private getters for MFMailComposeViewController
. Those setters only delegates the message to its internal implementation class.)
精彩评论