-
Notifications
You must be signed in to change notification settings - Fork 217
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
在使用拍照的时候崩了 #62
Comments
@lwy121810 你好,你可以看下最新代码看看效果,我换了这种方式来处理。
|
恩, 我刚刚又下载了一下, 不过还是崩溃 |
崩溃在- (void) setTorchOn:(BOOL)isOn 崩溃信息: |
@lwy121810 我加了一个判断. 麻烦再试下 |
可以了, 不会蹦了, 不过这样的话上面的闪电按钮有什么用呢?点击好像没什么效果啊? |
因为你的设备不支持闪光灯,o(╯□╰)o... |
原来如此,现在我看ZLPhoto都是用的<AssetsLibrary/AssetsLibrary.h>这个库 , 不过这个库不是已经被PhotoKit取代了么? 您有没有想过更换为PhotoKit?因为最近在学习您这个库, 谢谢 |
我是在使用pad真机运行的时候, 点击拍照上面第二个闪电按钮的时候崩溃的,崩溃在
// self.device.torchMode == AVCaptureTorchModeOff 判断
[self flashLightModel:^{
[self.device setTorchMode:AVCaptureTorchModeOff];//这一行
}];
}
崩溃信息为
相册Demo[12257:5168757] ** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureVideoDevice setTorchMode:] - the passed torchMode 0 is not supported by the device. Use -isTorchModeSupported: to discover valid torch modes.'
*** First throw call stack:
(0x1812f9900 0x180967f80 0x187584da0 0x100097664 0x100097290 0x1000975d4 0x186023e50 0x186023dcc 0x18600ba88 0x1860236e4 0x186023314 0x18601be30 0x185fec4cc 0x185fea794 0x1812b0efc 0x1812b0990 0x1812ae690 0x1811dd680 0x1826ec088 0x186054d90 0x1000857f0 0x180d7e8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
The text was updated successfully, but these errors were encountered: