How to programmatically silence the ringer or change the ringer tone on iOS5

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 07:28:09

Yes. Use AVSystemController. You don't instantiate it. It's a singleton.

http://code.google.com/p/iphone-dev/source/browse/trunk/include/include/Celestial/AVSystemController.h?r=136

[[AVSystemController sharedAVSystemController] setVolumeTo:10.0 forCategory:@"Ringtone"];
JoeCortopassi

This might be what you are looking for: Override ringer volume in iPhone apps

Basically, you set the volume using AVAudioPlayer on the -(void)viewDidLoad method of the view you are displaying on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!