¡@

Home 

2014/10/15 ¤U¤È 10:09:58

iphone Programming Glossary: hastorch

Activate the LED for a flashlight app

http://stackoverflow.com/questions/3253187/activate-the-led-for-a-flashlight-app

beginConfiguration AVCaptureDevice device AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeVideo if device hasTorch device hasFlash device lockForConfiguration nil device setTorchMode AVCaptureTorchModeOn device setFlashMode AVCaptureFlashModeOn..

How can I make the iPhone 4 LED light fire instantly?

http://stackoverflow.com/questions/3983032/how-can-i-make-the-iphone-4-led-light-fire-instantly

void toggleTorch AVCaptureDevice device AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeVideo if device hasTorch device hasFlash if device.torchMode AVCaptureTorchModeOff NSLog @ It's currently off.. turning on now. AVCaptureDeviceInput..

AVAssetWritter does not work with audio

http://stackoverflow.com/questions/5200077/avassetwritter-does-not-work-with-audio

camera.whiteBalanceMode AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance if camera hasTorch if camera isTorchModeSupported AVCaptureTorchModeOn camera setTorchMode AVCaptureTorchModeOn camera unlockForConfiguration.. camera.whiteBalanceMode AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance if camera hasTorch if torch if camera isTorchModeSupported AVCaptureTorchModeOn camera setTorchMode AVCaptureTorchModeOn else if camera..

How can I determine whether my iOS device has a torch light?

http://stackoverflow.com/questions/8418293/how-can-i-determine-whether-my-ios-device-has-a-torch-light

Instead use the API that tells you exactly if the feature is present. In your case you want to use AVCaptureDevice 's hasTorch property NSArray devices AVCaptureDevice devicesWithMediaType AVMediaTypeVideo NSMutableArray torchDevices NSMutableArray.. AVCaptureDevice devicesWithMediaType AVMediaTypeVideo NSMutableArray torchDevices NSMutableArray alloc init BOOL hasTorch NO for AVCaptureDevice device in devices if device hasTorch torchDevices addObject device hasTorch torchDevices count 0.. NSMutableArray torchDevices NSMutableArray alloc init BOOL hasTorch NO for AVCaptureDevice device in devices if device hasTorch torchDevices addObject device hasTorch torchDevices count 0 More information is available in the AV Foundation Programming..