2014-07-06 77 views
1

我收到以下警告,但我不確定如何解決該問題或者該問題嚴重: 這是針對星號中包含的自述:發送ViewController警告消息「const__strong到不兼容的類型參數AVCaptureMetadataOutputObjectsDelegateAVCaptureMetadataOutputObjectsDelegate中的「Self」的警告消息

- (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
[self.metadataOutput setMetadataObjectsDelegate:(id)self queue:dispatch_get_main_queue()]; 

有些晚,但可能有助於人們尋找答案:)