【发布时间】:2009-12-28 22:25:07
【问题描述】:
我正在尝试让 UISlider 与音量摇杆同步。我已成功使用滑块更改系统/铃声音量,但我需要滑块在摇杆移动时移动。关于如何获得当前音量值的任何建议?我正在使用下面的代码来监控音量变化:
- (void)volumeChanged:(NSNotification *)notification{
AVSystemController* avc = SharedAVSystemController;
// my sliders name is customVolume, and this is how I
// am trying to get the volume:
customVolume.value = [avc getVolume:(float *) forCategory:(id)];
}
另外,除了“铃声”还有哪些 AVSystemController 类别?
【问题讨论】:
-
您是如何获得 AVSystemController(或其他任何东西)来控制系统/铃声音量的?我现在正在研究如何自己做这件事。 how-to-disable-system-sounds