Im making a button play sound, like a button sound effect for example in jely car 3 when you press like a new game button it would have a sound effect like \"boop.\" I have done
Inside ViewDidLoad
AVAudioPlayer *pp1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"bomb" ofType:@"wav"]] error:nil];
self.playerBG = pp1;
[pp1 prepareToPlay];
[pp1 release];
use the below code to play sound where you want
[playerBG play];