I am开发者_Go百科 sending mail from the mail composer in iphone. I want to know the name from so that send "hello username" in the message body.
Is there is any way to get the username in mail composer.
Once the MFMailComposeViewController is visible you can't change the email. You have absolutely no control over the content of the mail once the view controller is visible.
From the documentation:
Important: The mail composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is not allowed to make further changes to the email content. The user may still edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields before presenting the interface.
The user can enter the recipient name on his own, or you can set it initially. Go through this http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html
精彩评论