我正在尝试让 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 类别?