IOS: sending SMS

Possible duplicate:
How to programmatically send SMS to iPhone?

Does anyone have any ideas how to send sms in iOS5 without using the default iPhone / iPad app? I mean in my application, I have a text box and a button. When I click the button, the entire line containing the text box will be sent to the specified recipient. Is it possible? thank,

+1
source share
1 answer

This is not possible - you need to use it MFMessageComposeViewController.

Usage example MFMessageComposeViewControllerfor copying your own text:

MFMessageComposeViewController *viewController = [[MFMessageComposeViewController alloc] init];
viewController.body = yourTextField.text;
[self presentModalViewController:viewController animated:YES];

yourTextField - UITextField UITextView .

, messageComposeDelegate (, self) MFMessageComposeViewControllerDelegate, , .

+9

Source: https://habr.com/ru/post/1654794/


All Articles