Alex Rivera | Logout

iPhone: how to make key click sound for custom keypad?

Asked 2009-05-04T01:38:04.750
20

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?

Edit
Report

1 Answer

1

You do not have to dispose of the sound object right away. Keep a pointer to that sound object in a property, and dispose of it only when you are about to play another sound before re-creating it.

And of course finally dispose of the SystemSoundID object in dealloc.

answered 2010-09-17T09:11:33.253

Your Answer