In this recipe, we will learn how to display the text messaging controller inside our app.
Perform the following steps to display the text messaging controller in our app:
Add a button on the view of the controller.
Enter the following
using
directive in theTextMessageAppViewController
file:using MonoTouch.MessageUI;
Implement the
ViewDidLoad
method with the following code, changing the recipient number and/or the message body at your discretion:private MFMessageComposeViewController messageController; public override void ViewDidLoad () { base.ViewDidLoad (); this.btnSendMessage.TouchUpInside += async (s, e) => { if (MFMessageComposeViewController.CanSendText) { this.messageController = new MFMessageComposeViewController(); this.messageController.Recipients = new string[] { "+123456789012" }; this.messageController...