Apple recommends using playInputClick
in custom keyboards to simulate a click sound. It's easier to implement AudioServicesPlaySystemSound(1104);
so my question then becomes, does playInputClick
provide better performance or is it the same thing?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Reason Apple recommended this is probably not performance. AudioServicesPlaySystemSound(1104)
will probably always play the same sound but playInputClick
may play another sound in the future if Apple decides to change the input click sound.
So they are the same right now but it might change and if it does your app will be the only one playing the old sound if you stick to use AudioServicesPlaySystemSound(1104)
.