iPhone 4的LED背光

时间:2010-07-08 19:55:02

标签: iphone video uiimageview

我试图找出如何使用UIIMagePicker或某种方式来使用iPhone 4的背光LED。我正在尝试使用带有按钮的UIView来打开LED和放大器。没有显示任何视频。这甚至可能吗?有什么帮助吗?

修改

我一直在使用AVCaptureDevice类或者至少尝试过。说到导入#import它告诉我它无效。

我尝试使用的代码是http://twitpic.com/23lv9v

2 个答案:

答案 0 :(得分:2)

你必须为此启用相机。查看AVCaptureDevice Class以及可能的AVCaptureTorchMode和AVCaptureFlashMode。

答案 1 :(得分:0)

你需要设置[videoCaptureDevice lockForConfiguration:nil]; 然后你可以打开火炬......

请参阅文档:http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html