如何在iPhone中以编程方式播放系统提示音?是否可以播放系统提示音而不将其添加到捆绑资源中 [英] How to Play system beep sound programatically in iPhone?Is it possible to play system sound without adding it to bundle resources

查看:79
本文介绍了如何在iPhone中以编程方式播放系统提示音?是否可以播放系统提示音而不将其添加到捆绑资源中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以播放系统蜂鸣警报声音.我不想将声音文件添加到资源束中,并且我想访问apple系统声音并在需要的地方播放它.

Is it possible to play system beep alert sound.I do not want to add the sound file to my resource bundle and i want to access the apple system sounds and play it wherever needed.

推荐答案

尝试一下

AudioServicesPlaySystemSound(1103);

AudioServicesPlaySystemSound(1103);

振动

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

有关声音列表

http://iphonedevwiki.net/index.php/AudioServices

这篇关于如何在iPhone中以编程方式播放系统提示音?是否可以播放系统提示音而不将其添加到捆绑资源中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆