我正在使用一个表视图,其中有一个单元格,上面写着"向我们发送反馈".它打开了电子邮件应用程序,其中包含要发送的预设信息.我可以发送电子邮件和/或取消它,但是当我第一次取消它时,留在桌面视图,再次点击单元格打开电子邮件,我无法再取消它.它只停留在电子邮件视图中.
建议?
我的代码如下:
import UIKit
import MessageUI
class FeedbackViewController: UITableViewController, MFMailComposeViewControllerDelegate {
let mailComposerVC = MFMailComposeViewController()
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem()
}
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if indexPath.section == 0 && indexPath.row == 0
{
let alertController = UIAlertController(title: "Rate …Run Code Online (Sandbox Code Playgroud)