以编程方式将iPhone静音 [英] Mute iPhone programmatically
本文介绍了以编程方式将iPhone静音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过使用AVSystemController
的setVolume
方法,我已经能够减小Ringer的音量.但是,它不会使设备静音,仍然还有5%的音量.我可能需要控制Silent开关,但没有找到任何有关它的信息.
I have been able to decrease the volume of Ringer by using AVSystemController
's setVolume
method. However, it doesn't mute the device, there is still 5% volume left. I might need to control the Silent switch but didn't find anything about it.
请注意,我不希望像该应用程序这样的答案被Apple拒绝,因为我不打算上传该应用程序.
Please note I don't want answers like The app will be rejected by Apple as I do not intend it to upload.
推荐答案
从技术上讲,可以通过Celestial.framework
It is technically possible to change the system volume through the private AVSystemController class
in Celestial.framework
这篇关于以编程方式将iPhone静音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文