views:

95

answers:

1

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.

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?

+1  A: 

The best bet is to use controller.view, and search for all UILabels in the subview hierarchy.

(Also, there aren't private getters for MFMailComposeViewController. Those setters only delegates the message to its internal implementation class.)

KennyTM
Yep, I guess that'll have to do - cheers.
Mark Beaton