Q:

how to hide Outlet in Xcode and save it from never appearing again? 

I want to hide a outlet that is also a button after the action is made, then I need it to be saved so it doesn't appear again. 
Ive used in the cation
- (IBAction)giveheart:(id)sender {
[_heartM setHidden:YES];

 nLife = [lblLife.text intValue]+1;
[savedStock setObject:[NSNumber numberWithFloat:nLife] forKey:@"life"];
[savedStock writeToFile: path atomically:YES];
}

Now I need to save it to not appear again even when the app is turned off and on again. 
How is that done, and what should I do? 

A:

Save the state in the  NSUserDefaults when button pressed.   
 - (IBAction)giveheart:(id)sender {
 //Save the state in NSUserDefaults here
[[NSUserDefaults standardUserDefaults]setObject:@"Yes" forKey:@"hide"];
[[NSUserDefaults standardUserDefaults]synchronize];
[_heartM setHidden:YES];

 nLife = [lblLife.text intValue]+1;
[savedStock setObject:[NSNumber numberWithFloat:nLife] forKey:@"life"];
[savedStock writeToFile: path atomically:YES];
}

in ViewDidLoad method of the viewcontroller
NSString *status = [[NSUserDefaults standardUserDefaults]objectForKey:@"hide"];
if(status ! = nil && [status isEqualToString:@"Yes"] )
[_heartM setHidden:YES];

