我有一个名为 AppPurchaseViewController 的视图,它从 IAPManagerm 类中调用一个函数。在我的收据被验证为应用内购买后,我想使用我在 AppPurchaseViewController 类中设置的 segue id 执行 segue。当我尝试这样做时,Xcode 给了我一个错误,上面写着“AppPurchaseViewController: 0x117e70ae0>) has no segue with identifier”。我的代码如下
case .purchased:
print("Purchased")
self.validateReceipt(completion: {(success) in
if success {
SKPaymentQueue.default().finishTransaction(transaction)
}
else {
}
//here is where I want to perform the segue
AppPurchaseViewController().performSegue(withIdentifier:'open', sender:nil)
})
有人能指出我正确的方向来加载这个视图吗?