Check mail service is ready before open VC
This commit is contained in:
parent
48d1ab34d2
commit
36e2a96df2
1 changed files with 3 additions and 1 deletions
|
|
@ -92,7 +92,9 @@ class BasicStaticTableViewController: UITableViewController, MFMailComposeViewCo
|
|||
case "mailto":
|
||||
let urlComponents = URLComponents(string: link)!
|
||||
let subject = urlComponents.queryItems![0].value ?? ""
|
||||
sendEmail(toRecipients: [urlComponents.path], subject: subject)
|
||||
if MFMailComposeViewController.canSendMail() {
|
||||
sendEmail(toRecipients: [urlComponents.path], subject: subject)
|
||||
}
|
||||
case "http", "https":
|
||||
let svc = SFSafariViewController(url: URL(string: link)!, entersReaderIfAvailable: false)
|
||||
self.present(svc, animated: true, completion: nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue