¡@

Home 

2014/10/15 ¤U¤È 10:03:55

iphone Programming Glossary: areadsremoved

How do you add a In-app purchase to an iPhone application?

http://stackoverflow.com/questions/19556336/how-do-you-add-a-in-app-purchase-to-an-iphone-application

purchase will NOT work now we're going to get into the actual coding. Add the following code into your .h file BOOL areAdsRemoved IBAction purchase IBAction restore IBAction tapsRemoveAdsButton and now add the following into your .m file this part gets.. removeAdsButton.hidden YES removeAdsButton.enabled NO NSUserDefaults standardUserDefaults setBool adsRemoved forKey @ areAdsRemoved use NSUserDefaults so that you can load wether or not they bought it NSUserDefaults standardUserDefaults synchronize If.. the background blue. To do this we would want to add void doRemoveAds self.view setBackgroundColor UIColor blueColor areAdsRemoved YES set the bool for wether or not they purchased it to YES you could use your own boolean here but you would have to declare..