One approach would be to use NSUserDefaults in order to save button state.
When purchase completed set a NSUserDeafult to yes
-(void)confirmPurchase
{
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"itemXPurchased"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
Since structure you are using is VC1(root)-->VC2 and you want to update VC1 which is at the bottom of viewstacks
it wont automatically update itself when you pop Viewcontroller2 from stack. So you need to use either NSNotificationCenter or delegate pattern.
in your ViewController1 either for delegate
or nsnotification
function you can add something like
-(void)updateButton{
if([[NSUserDefaults standardUserDefaults] boolForKey:@"itemXPurchased"])
{
//itemXPurchased bool is set to YES you can update your button
}
}
EDIT 1: forgot to mention that user can access NSUSERDEFAULTS if they are willing to take their time and go to app's sandbox and use an app called iExplore to find the apps NSUSERDEFAULTS plist and change the values.
So if you want your app more secure use this
https://github.com/matthiasplappert/Secure-NSUserDefaults
or this
http://code.tutsplus.com/tutorials/securing-and-encrypting-data-on-ios--mobile-21263