I had created custom keyboard with UIView
.
However, I didn't hear the click sound of the keyboard.
So I tried following code, but I can't hear anything.
How can I play that keyboard click sound?
NSURL* musicFile = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"Tock"
ofType:@"aiff"]];
AVAudioPlayer *click = [[AVAudioPlayer alloc] initWithContentsOfURL:musicFile error:nil];
[click setVolume:0.15f];
[click play];
And also I tried this:
AudioServicesPlaySystemSound(0x450);
How can I achieve this?