简体   繁体   English

在iPhone上播放内置声音

[英]Playing built in sounds on the iPhone

I have an app that has a fake SMS screen, when this is displayed I want to play one of the SMS sounds that are on the phone. 我有一个带有假短信屏幕的应用程序,当显示时我想播放手机上的一个短信声音。

How do I do this? 我该怎么做呢?

You'd have to find the audio file and play it from your app. 你必须找到音频文件并从你的应用程序播放它。 There's no SDK hook to make the notification sound play. 没有SDK挂钩可以播放通知声音。

SysSound是播放声音的好示例代码,但您需要提供自己的声音文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM