【发布时间】:2019-08-03 03:36:37
【问题描述】:
您好想通过短信推荐朋友,我编写了以下代码。如果用户选择打开带有文本的 SMS 但它没有再次取消用户将无法返回应用程序。
if indexPath.item == 1
{
//SMS
if MFMessageComposeViewController.canSendText() {
let urlToShare = self.referalmodeldata[0].referralCodeOnly
controller1.body = "Hey I just gave an Awesome Assessment on App you can also try it. I scored , Try to beat my score \(String(describing: urlToShare))"
controller1.messageComposeDelegate = self as? MFMessageComposeViewControllerDelegate
self.present(controller1, animated: true, completion: nil)
}
}
【问题讨论】: