【发布时间】:2016-04-27 15:17:42
【问题描述】:
我正在从以下代码获取系统音量
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(volumeChanged:)
name:@"AVSystemController_SystemVolumeDidChangeNotification"
object:nil];
- (void) volumeChanged:(NSNotification *)
{
float volume = [[[notification userInfo]
objectForKey:@"AVSystemController_AudioVolumeNotificationParameter"]
floatValue];
// here volume is the .....
}
但是如何从 xcode 设置系统或设备音量(目标 C)
【问题讨论】:
-
这个供您参考stackoverflow.com/questions/4859402/ios-change-device-volume。希望您能找到一些有用的信息。
标签: ios objective-c