ios - 在 iOS swift 中实现完成时出错

标签 ios swift

  let mailComposeViewController = self.configuredMailComposeViewController(randomNumber, email: email!)
   if MFMailComposeViewController.canSendMail()
   {
         self.presentViewController(mailComposeViewController, animated: true, completion { () -> Void in

              self.securityCode(randomNumber, email: email!)
         })
     }
     else
     {
          self.showSendMailErrorAlert()
     }

最佳答案

您错误地使用了补全。像这样使用它

self.presentViewController(mailComposeViewController, animated:true) { () -> Void in
             self.securityCode(randomNumber, email: email!)
        }

关于ios - 在 iOS swift 中实现完成时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32305660/

相关文章:

ios - 当设备因错误而锁定时,URLSessionConfiguration 后台下载任务失败 - 与后台传输服务的连接丢失

ios - 非常基本的 Swift 动画

c# - Monotouch守护程序应用程序

ios - 为什么 NSURLCreationDateKey 的值在 iOS 4.3 上为 nil 而在 iOS 5+ 上却没有?

ios - UIImageView 在 UIView 中的位置完全错误

ios - Objective C 到 Swift 的转换

iOS 应用内购买 : Auto-renewable subscriptions by own system user account

iphone - UITableView单元格重绘导致文本重叠

javascript - 解析: Cloud JS code vs Swift does not produce the same results

ios - 如何从我们的 iOS 应用程序中取消 BLE 设备的配对?