I read a lot of documentations and topics about playing keyboard clicks, but I can't get it to work in my app...
I designed a custom keyboard (as a UIView subview), which adopts the UIInputViewAudioFeedback protocol, and returns YES for the enableInputClicksWhenVisible
method.
But when I call [[UIDevice currentDevice] playInputClick]
, nothing happens (whereas I can hear the click when I use the default keyboards).
In the Apple UIKit framework reference, it's written that it should work "only if the input view is itself enabled and visible". My view is obviously visible, and even if I change the superclass from UIView to UIControl, and set self.enabled = YES, it doesn't work either...
I saw a lot of solutions like AudioServicesPlaySystemSound(1104);
but I didn't even tried because I don't want to play clicks if the user disabled the keyboard clicks in settings.
Why don't the "official" solution work? It doesn't seem to be deprecated in iOS 8...
Thanks a lot
Thomas