Hi , iam using setting.bundle and i try to show a hidden picture with Switch toggle , here is my code but i miss something :
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[//Some code show the hidden pic]; myPic.hidden = NO;
my key is .e.g = wood_back
should i use ObjectForKey
?
//Sound Problem :
now i try to off a sound effect on my app
play method is [myMusic play];
BOOL soundIsOff = [defaults boolForKey:@"sound_off"];
//the problem is here :D
//xcode compiler doesn't copile this code
[myMusic play] = soundIsOff
sound code :
///sound effect
NSString * musicSonati = [[NSBundle mainBundle] pathForResource:@"sound" ofType:@"wav"];
myMusic = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:musicSonati] error:NULL];
myMusic.delegate = self;
myMusic.numberOfLoops = 0;