-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AVCaptureDevice setTorchMode:] The passed torchMode 1 is not supported - use -isTorchModeSupported: to discover valid torch modes #167
Comments
你好,我也遇到了同样的问题,请问你把判断具体加到哪一个地方了呢? |
@624990742 更新一下库试试看, 这个判断合并到master了. |
好的,我更新一下 |
你好,我的最新版本就是2.3的,好像没有更新过来啊 |
zhyizhou
added a commit
to zhyizhou/LBXScan
that referenced
this issue
Aug 12, 2019
@624990742 刚PR作者了, 等他操作更新. |
@624990742 可以尝试安装master分支, 或者手动修改. pod 'LBXScan', git:"https://github.com/MxABC/LBXScan.git" |
已更新2.4.1版本,ZBar删除了UIWebView,另外Demo提供了扫码控制器,建议基于Demo提供的扫码控制器自行调试修改 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
设备不支持闪光灯,例如ipad设备,需要在闪光灯打开的代码部分先做判断
(void)setTorch:(BOOL)torch {
[self.input.device lockForConfiguration:nil];
if ([self.input.device hasTorch]) {
self.input.device.torchMode = torch ? AVCaptureTorchModeOn : AVCaptureTorchModeOff;
}
[self.input.device unlockForConfiguration];
}
此处是否应该要这样支持下呢?目前没有的
The text was updated successfully, but these errors were encountered: