save bool in nsuserdefaults
when my app starts music is playing: -(void)playBgMusic { NSString *path = [[NSBundle mainBundle] pathForResource:@"bgmusic" ofType:@"aif"]; theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio play]; } but he should be able to turn the music off by pressing a button if he presses the button again the music should turn on again. i have: -(IBAction)check { if (isquiet == NO) { [theAudio stop]; isquiet = YES; defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:YES forKey:@"stringKey"]; } else { [self