I am trying to implement the UIInputViewAudioFeedback protocol.
I have created a custom subclass of UIView. The header file contains the protocol and the m file implements the method enableInputClicksWhenVisible.
In Interface Builder I then set the View’s Class to my Custom Class. I then went into the methods that get triggered by tapping UIButtons that are on the view and execute [[UIDevice currentDevice] playInputClick];
I have keyboard clicks on my iPhone turned on, but when I tap the buttons they just won’t make a sound.
What am I doing wrong?
Thanks
The only thing I can think of is that you’re trying to implement this protocol on an arbitrary view. Playing the input clicking sound is only available to custom views that are used as replacements for the system keyboard.
From the iOS Developer Library document UIInputViewAudioFeedback Protocol Reference:
To implement a custom keyboard, see Custom Views for Data Input.