IPhone: how to make key click sound for custom keypad

audioclickiphone

Is there a way to programmatically invoke the keypad "click" sound? My app has a custom keypad (built out of UIButtons) and I'd like to provide some audio feedback when the user taps on the keys. I tried creating my own sounds in Garageband, but wasn't happy with any of my creations. If there isn't a standard way to invoke the key click, can anyone point me to a library of sounds that might have such a gem?

Best Solution

There is a really fast solution to play the default keyboard sound:

  1. Add AudioToolbox.framework

  2. Add the following line wherever you want the sound to play:

    AudioServicesPlaySystemSound(0x450);

Related Question