34,333
edits
Changes
no edit summary
super.viewDidLoad()
let appdelegate = UIApplication.sharedApplication().delegate
as ! AppDelegate
appdelegate.homeViewController = self
if SKPaymentQueue.canMakePayments() {
let request = SKProductsRequest(productIdentifiers:
NSSet(objects: self.productID)as Set<NSObject>)
request.delegate = self
request.start()
func paymentQueue(queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!) {
for transaction in transactions as ! [SKPaymentTransaction] {
switch transaction.transactionState {
func unlockFeature() {
let appdelegate = UIApplication.sharedApplication().delegate
as ! AppDelegate
appdelegate.homeViewController!.enableLevel2()