我试图在我的iOS应用程序中设置不同类中的两个委托,但是,SDK声明是用Swift 3编写的。以下是我想要转换为Swift 2.2的内容
func paymentMethodsViewController(_ paymentMethodsViewController: STPPaymentMethodsViewController, didFailToLoadWithError error: Error)
func paymentContext(_ paymentContext: STPPaymentContext, didFinishWith status: STPPaymentStatus, error: Error?)
func paymentContext(_ paymentContext: STPPaymentContext, didFailToLoadWithError error: Error)
我收到错误"使用未解析的标识符'错误'"
答案 0 :(得分:1)
试试这个
func paymentMethodsViewController(paymentMethodsViewController: STPPaymentMethodsViewController, didFailToLoadWithError error: NSError)
func paymentContext(paymentContext: STPPaymentContext, didFinishWith status: STPPaymentStatus, error: NSError?)
func paymentContext(paymentContext: STPPaymentContext, didFailToLoadWithError error: NSError)