In a custom keyboard or input accessory you may want to support audio feedback or, as they say on the street, key clicks.
The code snippet below summarizes how to do this:
// Adopt the UIInputViewAudioFeedback protocol
@interface CustomKeyboardAccessoryView : UIView< UIInputViewAudioFeedback> {
}
...
@end
// Implement protocol
- (BOOL)enableInputClicksWhenVisible
{
return YES;
}
// When you should click call
[[UIDevice currentDevice] playInputClick];
Reference
Text, Web and Editing Programming Guide for iOS: Playing Input Clicks