CardIOPaymentViewController

CardIOPaymentViewController

当我尝试用card.IO扫描一张卡时。它不会打开相机,更不用说它周围的绿线了。当我运行此代码并按下按钮时,它不会在视图控制器中显示相机。有什么想法吗?样品在obj-C的io8中工作良好。

@IBAction func PressScan(sender: AnyObject) {

    var CardScanner : CardIOPaymentViewController = CardIOPaymentViewController()
    CardScanner.modalPresentationStyle = UIModalPresentationStyle.FullScreen
    self.presentViewController(CardScanner, animated: true, completion: nil)




}
override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    CardIOPaymentViewController.preload()
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

func userDidProvideCreditCardInfo(cardInfo: CardIOCreditCardInfo!, inPaymentViewController paymentViewController: CardIOPaymentViewController!) {

}

func userDidCancelPaymentViewController(paymentViewController: CardIOPaymentViewController!) {

}

plist文件中是否有需要修改的地方,以便允许iOS8的摄像机访问?

最佳答案

解决方案如下:https://github.com/card-io/card.io-iOS-SDK/issues/76#issuecomment-65856792
即:
您没有正确初始化CardIOPaymentViewController。应该是
var CardScanner:CardIOPaymentViewController=CardIOPaymentViewController(paymentDelegate:self)

10-08 05:58