我在应用程序商店中建立一个 创建了一个UITableViewController。不幸的是它不允许添加到类:SKPaymentTransactionObserver,SKProductsRequestDelegate:
导入UIKit 导入StoreKit
类StoreTableViewController:UITableViewController,SKPaymentTransactionObserver,SKProductsRequestDelegate
{
var product: SKProduct!
override func viewDidLoad() {
super.viewDidLoad()
//Start an observer
SKPaymentQueue.defaultQueue().addTransactionObserver(self)
}
备注:无法使用UITableViewController类型的参数列表调用addTransactionObserver