我想显示一个选择器视图或所有可用手机声音的列表。这样用户就可以改变app的声音警报(它不会影响系统声音文件)。
应用程序功能之一将允许用户仅在应用程序中播放选定的声音。
如果有任何方法可以告诉我。
谢谢!任何帮助将不胜感激。
// import this
import AVFoundation
// create a sound ID, in this case its the tweet sound.
let systemSoundID: SystemSoundID = 1016
// to play sound
AudioServicesPlaySystemSound (systemSoundID)