AVCaptureMetadataOutputObjectsDelegate中“Self”的警告消息

时间:2014-07-06 19:39:09

标签: angle

我收到以下警告,我不确定如何解决或者是否严重: 这是用于包含在星号中的自我声明:将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];
}

1 个答案:

答案 0 :(得分:1)

[self.metadataOutput setMetadataObjectsDelegate:(id)self queue:dispatch_get_main_queue()];

有点晚,但可能对寻找答案的人有帮助:))