【发布时间】:2012-12-10 11:07:18
【问题描述】:
似乎每次启动 AVCaptureSession 时都会触发 iPhone 5 上的 AVSystemController_SystemVolumeDidChangeNotification 事件。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(volumeChanged:) name:@"AVSystemController_SystemVolumeDidChangeNotification" object:nil];
有谁知道如何解决这个问题?我正在使用这个 Observer 用音量按钮拍照(我知道它是一个私有 API,但它与默认相机应用程序的功能相同,Apple 通常对此视而不见......),但 仅在 iPhone 上5 每次启动相机都会拍摄一张照片。
【问题讨论】:
-
你还有这个问题吗?我想使用
AVSystemController_SystemVolumeDidChangeNotification,但我没有 iPhone 5 进行测试。 -
是的,不幸的是我尝试在 iPhone5 上测试解决这个问题,但似乎很难做到:(
-
您有没有找到其他检测音量按钮按下的好方法? (除了整个 Audio Session 监听器方法。)
-
不,目前。我只是停用了 iPhone5 设备的功能
标签: ios iphone-5 avcapturesession