iPhone 4 的 LED 背光
我试图弄清楚如何使用 UIIMagePicker 或某种方式来使用 iPhone 4 的背光 LED。我正在尝试使用带有按钮的 UIView 来打开 LED 灯并打开 LED 灯。关闭而不显示任何视频。这可能吗?有什么帮助吗?
编辑
我一直在使用 AVCaptureDevice 类或至少尝试使用。当涉及到导入#import时,它告诉我它无效。
我尝试使用的代码是 http://twitpic.com/23lv9v
I am trying to figure out how to use the UIIMagePicker or some way to use the iPhone 4's Backlight LED. I am trying to use a UIView with a button on it to turn the LED on & off without showing any video. Is this even possible? Any help?
EDIT
I've been using AVCaptureDevice class or at least trying to. When it comes to importing #import It tells me it isnt valid.
The code I am trying to use is http://twitpic.com/23lv9v
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须为此启用相机。查看 AVCaptureDevice 类 和可能是 AVCaptureTorchMode 和 AVCaptureFlashMode。
You have to enable the camera for that. Look at the AVCaptureDevice Class and possibly AVCaptureTorchMode and AVCaptureFlashMode.
您需要设置[videoCaptureDevice lockForConfiguration:nil];
然后你可以打开手电筒...
请参阅文档: http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html
you need to set [videoCaptureDevice lockForConfiguration:nil];
then you can turn on the torch...
See the docs: http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html