使用此代码,您可以播放一种更常见的系统声音:
let systemSoundID: SystemSoundID = 1003
AudioServicesPlaySystemSound(systemSoundID)
但是,您在 IOS 中内置的 UI 有很多很棒的声音,您可以在这些路径上找到:
/System/Library/Audio/UISounds/nano/Detent_Haptic.caf
那么,如何找到这些声音的 ID?
使用此代码,您可以播放一种更常见的系统声音:
let systemSoundID: SystemSoundID = 1003
AudioServicesPlaySystemSound(systemSoundID)
但是,您在 IOS 中内置的 UI 有很多很棒的声音,您可以在这些路径上找到:
/System/Library/Audio/UISounds/nano/Detent_Haptic.caf
那么,如何找到这些声音的 ID?