发送短信MFMessageComposeViewController

        if([MFMessageComposeViewController canSendText]) {
            MFMessageComposeViewController * controller = [[MFMessageComposeViewController alloc] init];
            controller.recipients = @[weakSelf.detailModel.Telphone];//收信人
            //            controller.body = body;//短信内容
            controller.messageComposeDelegate = weakSelf;
            [weakSelf presentViewController:controller animated:YES completion:nil];
        } else {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示信息"
                                                            message:@"该设备不支持短信功能"
                                                           delegate:nil
                                                  cancelButtonTitle:@"确定"
                                                  otherButtonTitles:nil, nil];
            [alert show];
        }
-(void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result {
    [self dismissViewControllerAnimated:YES completion:nil];
}
原文地址:https://www.cnblogs.com/mkai/p/6249735.html