【发布时间】:2017-05-27 04:18:05
【问题描述】:
我正在尝试在后台显示视频/摄像头视图,同时我还允许在我的应用中针对各种操作进行触觉反馈,但似乎 AVFoundation 无法很好地处理我正在进行的任何涉及的调用触觉呼叫:
if #available(iOS 10.0, *) {
let generator = UIImpactFeedbackGenerator(style: .light)
generator.prepare()
generator.impactOccurred()
// More:
let feedbackGenerator = UISelectionFeedbackGenerator()
feedbackGenerator.selectionChanged()
}
只要注释掉 AVFoundation 内容,触觉反馈就可以很好地发挥作用。有什么想法吗?
使用:
captureSession = AVCaptureSession()
与:
previewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
【问题讨论】:
-
我也有同样的问题
-
这似乎导致音频输入(麦克风)干扰 UIImpactFeedbackGenerator。我正在努力寻找解决自我的方法...
-
这有什么更新吗?
标签: ios swift avfoundation avcapturedevice haptic-feedback