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?
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)
.
来源:https://stackoverflow.com/questions/27007922/ios-is-there-a-performance-difference-between-using-playinputclick-vs-the-1104