尝试在修改了 flashMode 属性的情况下拍照时出现以下错误:
{ NSLocalizedDescription: 'Error Domain=AVFoundationErrorDomain Code=-11800 "操作无法完成" UserInfo={NSUnderlyingError=0x170440210 {Error Domain=NSOSStatusErrorDomain Code=-16800 "(null)"}, NSLocalizedFailureReason=发生未知错误 (- 16800), NSLocalizedDescription=操作无法完成}' } } 2017-09-12 00:08:29.907053-0300 GimenesApp[1936:765074] { [Error: Error Domain=AVFoundationErrorDomain Code=-11800“操作不能完成" UserInfo={NSUnderlyingError=0x170440210 {Error Domain=NSOSStatusErrorDomain Code=-16800 "(null)"}, NSLocalizedFailureReason=发生未知错误 (-16800), NSLocalizedDescription=操作无法完成}]
这是我正在使用的一段代码:
<Camera
captureTarget={Camera.constants.CaptureTarget.disk}
ref={(cam) => {
this.camera = cam;
}}
flashMode={this.state.flashMode}>
<Button onPress={this.takePicture.bind(this)} transparent
<Icon name="ios-radio-button-off" />
</Button>
</Camera>