Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to dim the light of iPhone's camera flash light programmatically?

Is it possible to dim the light of iPhone's camera flash light programmatically?

Please let me know.

like image 210
meetpd Avatar asked Dec 31 '25 00:12

meetpd


2 Answers

iOS5 will help you with this. It is still under NDA. I suggest you look in the beta documentation for AVCaptureDevice or ask on the Apple developer forum.

It is not possible in iOS4.3.

When the NDA is lifted I will edit this response to give the documentation link.

EDIT

Sorry, it looks like Apple removed the ability to change the torch level in the public release of iOS5. The torchLevel property of AVCaptureDevice is now read-only.

like image 144
Robin Summerhill Avatar answered Jan 02 '26 14:01

Robin Summerhill


As of iOS 6.0, there is a new call, setTorchModeOnWithLevel, which allows you to set the torch level.

- (BOOL)setTorchModeOnWithLevel:(float)torchLevel error:(NSError **)outError 
like image 39
mahboudz Avatar answered Jan 02 '26 15:01

mahboudz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!