这个问题在这里已有答案:
- AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection? 9个答案
我想在没有任何声音的情况下使用AVfoundation拍摄图像(是的,我记住,用户选择将实现此功能)
关于堆栈溢出的两个问题提供了最多的信息:
-
AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection?(未接受并确认答案)
-
Muting AVCapture shutter sound on iPhone(建议
AVCaptureVideoDataOutput
)
这两个答案都指捕获视频帧,我认为这是正确的 . 问题是AVfoundation库真的没有它(使用 AVCaptureStillImageOutput
捕获图像对我来说本身很难) .
1 回答
我发现代码在这里做..
http://www.benjaminloulier.com/articles/ios4-and-direct-access-to-the-camera
Important parts outlined..
设置你的会话就像这样
You will get the camera output in the following method.. I make a image and add it to my parent View..You can change it to your need