Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Apple 建议使用playInputClick自定义键盘来模拟点击声音。它更容易实现AudioServicesPlaySystemSound(1104);,所以我的问题变成了,playInputClick提供更好的性能还是同样的事情?
playInputClick
AudioServicesPlaySystemSound(1104);
苹果推荐这可能不是性能的原因。 AudioServicesPlaySystemSound(1104)可能会始终播放相同的声音,但playInputClick如果 Apple 决定更改输入点击声音,则将来可能会播放另一种声音。
AudioServicesPlaySystemSound(1104)
所以它们现在是相同的,但它可能会改变,如果它改变了,如果你坚持使用,你的应用程序将是唯一播放旧声音的应用程序AudioServicesPlaySystemSound(1104)。