I had created custom keyboard with UIView
.
However I didn't hear click sound of keyboard.
So I tried following codes.But I can't hear anythings.
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 next one.
AudioServicesPlaySystemSound(0x450);
How can I?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…