どんなシステムサウンドがあるか一気に試聴したいですよね!
import SwiftUI
import AudioToolbox
struct ContentView: View {
var body: some View {
ScrollView{
VStack{
Group{
ForEach(1470 ..< 1500){ i in // 1000以降、いっぱいあります…
Button(action:{
AudioServicesPlayAlertSoundWithCompletion(SystemSoundID(i), nil)
}){
Text("\(i)")
}
}
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}