问题
I have subclassed RMMessageComposeViewController : MFMessageComposeViewController
. The extra functionality that I'm aiming for is for the MFMessageComposeViewController
to be able by itself to present a new message compose controller (over itself).
So I should from one RMMessageComposeViewController
instance present a new one. The message result from the new instance should be sent to the parent (or "old" one). So I suppose I need to set the parent message compose controller as the delegate when I'm creating the child ("new" one).
Could someone please help me think this out, what instance variables I need to add (parents, children?) How to setup the child message compose controller?
回答1:
From the docs:
The message composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is unable to make further changes to the SMS content.
What you're trying to do there is explicitly not supported because of security concerns: It would make it easy for an application to forge messages. While you can probably push a view on top of it, I suspect your app would get rejected from the App Store for doing it.
I wouldn't be surprised if MFMessageComposeViewController prevents an application from creating more than one instance at a time, though I haven't confirmed this.
来源:https://stackoverflow.com/questions/11455734/ios-subclassing-mfmessagecomposeviewcontroller-to-add-extra-functionality