不兼容的指针类型将 'AVCapturePhotoSettings *' 发送到 'NSArray<AVCapturePhotoSettings *> * _Nonnull' 类型的参数
Incompatible pointer types sending 'AVCapturePhotoSettings *' to parameter of type 'NSArray<AVCapturePhotoSettings *> * _Nonnull'
我通过以下代码收到上述错误
captureOutput = [[AVCapturePhotoOutput alloc]init];
AVCapturePhotoSettings* hots = [AVCapturePhotoSettings photoSettingsWithFormat:@{AVVideoCodecKey:AVVideoCodecTypeJPEG}];
[captureOutput setPreparedPhotoSettingsArray:hots completionHandler:nil];
我正在尝试制作条码扫描仪
改用这个:
[captureOutput setPreparedPhotoSettingsArray:@[hots] completionHandler:nil];
我通过以下代码收到上述错误
captureOutput = [[AVCapturePhotoOutput alloc]init];
AVCapturePhotoSettings* hots = [AVCapturePhotoSettings photoSettingsWithFormat:@{AVVideoCodecKey:AVVideoCodecTypeJPEG}];
[captureOutput setPreparedPhotoSettingsArray:hots completionHandler:nil];
我正在尝试制作条码扫描仪
改用这个:
[captureOutput setPreparedPhotoSettingsArray:@[hots] completionHandler:nil];