Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 664
George Armhold Avatar asked May 04 '09 01:05

George Armhold


People also ask

Can I change the keyboard click Sound on iPhone?

Turn iPhone keyboard sounds on or offOpen the Settings app. Go to Sounds & Haptics > Keyboard Feedback.

How do I change the click Sound on my Apple keyboard?

All repliesTap on Settings > Sounds & Haptics. Scroll down to reveal Keyboard clicks. Set Keyboard Clicks to Off.


1 Answers

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);

like image 91
pposthoorn Avatar answered Sep 24 '22 02:09

pposthoorn