ios - Camera Flash is not working -


i trying make extension marmalade, turns on , off camera flash in iphone. referring this answer on using camera flash. i've put exact code has mentioned , [device settorchmode:avcapturetorchmodeon]; gets called too. flash doesn't respond, if nothing has happened. there need do, make work static library, can use in extension?

update:-
using ios-sdk 6.1 compile extension , testing on iphone 4 (ios version 4.3.1). testing on iphone 5 (ios version 6.0.0), , flash turning on, not turning off. guess might help.

that code copied may have error in it. try following:

-(void)turnonflash {     avcapturedevice *device = [avcapturedevice defaultdevicewithmediatype:avmediatypevideo];         if ([device hastorch]) {             [device lockforconfiguration:nil];             [device settorchmode:avcapturetorchmodeoff];             [device unlockforconfiguration];         } } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -