1

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

Frankrockz
  • 594
  • 1
  • 6
  • 24
  • Please see my answer here for future reference: http://stackoverflow.com/questions/3190034/turn-on-torch-flash-on-iphone-4/3367424#3367424 – iwasrobbed Jul 29 '10 at 22:22

2 Answers2

2

You have to enable the camera for that. Look at the AVCaptureDevice Class and possibly AVCaptureTorchMode and AVCaptureFlashMode.

Sharjeel Aziz
  • 8,495
  • 5
  • 38
  • 37
0

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