我收到以下警告,我不确定如何解决或者是否严重: 这是用于包含在星号中的自我声明:将ViewController警告消息" const__strong发送到不兼容类型的参数AVCaptureMetadataOutputObjectsDelegate
- (void) setupAVFoundationFaceDetection
{
self.metadataOutput = [AVCaptureMetadataOutput new];
if (! [self.session canAddOutput:self.metadataOutput])
{
NSLog (@"\nCould not add Face Detection...\n");
return;
}
NSLog (@"\nIn Face Detection...\n");
[self.metadataOutput setMetadataObjectsDelegate:**self** queue:dispatch_get_main_queue()];
[self.session addOutput:self.metadataOutput];
if (! [self.metadataOutput.availableMetadataObjectTypes containsObject:AVMetadataObjectTypeFace] )
{
NSLog(@"Face Detection is not supported\n");
// [self teardownAVFFoundationFaceDetection];
return;
}
self.metadataOutput.metadataObjectTypes = @[AVMetadataObjectTypeFace];
}
答案 0 :(得分:1)
[self.metadataOutput setMetadataObjectsDelegate:(id)self queue:dispatch_get_main_queue()];
有点晚,但可能对寻找答案的人有帮助:))