IOS-闪光灯操作
来源:互联网 发布:mac照片搜索 编辑:程序博客网 时间:2024/04/28 15:13
enum {
AVCaptureDevicePositionB
AVCaptureDevicePositionF
};
typedef NSInteger AVCaptureDevicePosition;
闪光灯开关
enum {
AVCaptureFlashModeOff
AVCaptureFlashModeOn
AVCaptureFlashModeAuto = 2
};
typedef NSInteger AVCaptureFlashMode;
手电筒开关
enum {
AVCaptureTorchModeOff
AVCaptureTorchModeOn
AVCaptureTorchModeAuto = 2,
};
typedef NSInteger AVCaptureTorchMode;
焦距调整
enum {
AVCaptureFocusModeLocked
AVCaptureFocusModeAutoFo
AVCaptureFocusModeContin
};
typedef NSInteger AVCaptureFocusMode;
曝光量调节
enum {
AVCaptureExposureModeLoc
AVCaptureExposureModeAut
AVCaptureExposureModeCon
};
typedef NSInteger AVCaptureExposureMode;
白平衡
enum {
AVCaptureWhiteBalanceMod
AVCaptureWhiteBalanceMod
};
typedef NSInteger AVCaptureWhiteBalanceMod
开启闪光灯
AVCaptureDevice* d = nil;// find a device by positionNSArray* allDevices = [AVCaptureDevice devices];for (AVCaptureDevice* currentDevice in allDevices) { if (currentDevice.position == AVCaptureDevicePositionBack ) { d = currentDevice; }}
// at this point, d may still be nil, assuming we found something we like....NSError* err = nil;BOOL lockAcquired = [d lockForConfiguration:&err];if (!lockAcquired) { // log err and handle...} else { // flip on the flash mode if ([d hasFlash] && [d isFlashModeSupported:AVCaptureFlashModeOn] ) { [d setFlashMode:AVCaptureFlashModeOn]; } [d unlockForConfiguration];}
- IOS-闪光灯操作
- IOS-闪光灯操作
- iOS闪光灯操作
- IOS-闪光灯操作
- IOS打开系统闪光灯操作
- iOS 闪光灯
- ios闪光灯
- android闪光灯操作代码
- IOS 调用iphone闪光灯
- ios调用闪光灯
- ios闪光灯调用
- iOS 调用闪光灯
- iOS打开闪光灯
- iOS自动打开闪光灯
- iOS 关闭和开启闪光灯
- iOS 打开、关闭闪光灯
- 闪光灯
- 闪光灯
- 如何在iOS中使用Block──How to use Blocks with iOS
- IBM POWER7+ 740 服务器一览表
- busybox编译心得
- 查询DB2数据库约束
- java实现链表
- IOS-闪光灯操作
- nginx http_core模块 配置文件解析 2
- Android WebView白屏
- 打造一个自己的模板引擎(二)
- android 修改默认浏览器的默认主页和去除书签
- 正则表达(所有内容)
- QT_双缓冲技术1
- java学习笔记11 - 使用forward实现API接口转发
- windows环境下,硬盘安装各种linux发行版本。以linux mint 14为例。