Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 4, 2011, 08:34 PM   #1
ppn
macrumors member
 
Join Date: Oct 2010
In App purchase - hide button when complete

I'm implementing an in app purchase and everything works fine in the sandbox environment but I can't seem to hide the "upgrade" button once the purchase is complete. I have a bool value to store whether the app has been purchased but after the purchase, I need to go to another view and come back before the upgrade button is hidden.

Any suggestions? I've followed the example in this website for the in app purchase template. Is there a way to send a notification to my main view and request it to hide the button?

Code:
- (IBAction)upgrade:(id)sender{
    InAppPurchase *inAppPurchase = [[InAppPurchase alloc] init];
    [inAppPurchase requestProUpgradeProductData];
    [inAppPurchase purchaseProUpgrade];
    if ([[NSUserDefaults standardUserDefaults] boolForKey:kupgradePurchased] == YES) {
        upgrade.hidden = YES;
    }
}

Last edited by ppn; Apr 4, 2011 at 09:06 PM.
ppn is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Hide Top Sites button Nermal OS X Mavericks (10.9) 7 Oct 22, 2013 06:27 PM
Can we get a "HIDE THREAD" Button for the love of gods? BookerDW Site and Forum Feedback 7 Sep 15, 2013 06:09 PM
Can you hide app in iOS 7? digitalove iOS 7 3 Sep 3, 2013 07:20 PM
Hide Purchase History on iPad and iPhone? ma1nstr3am iPhone and iPod touch Apps 0 Sep 2, 2013 08:04 PM
iTunes: Please contact iTunes Support to Complete Purchase CraigM26 iCloud and Apple Services 5 Dec 24, 2012 01:56 AM

Forum Jump

All times are GMT -5. The time now is 07:26 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC