I have qr reader with new ios 7.
I need detect where is the code on the screen (corners).
I use AVMetadataObject to it.
Have you got any idea, how to detect it?
- (void)captureOutput:(AVCaptureOutput *)captureOutput
didOutputMetadataObjects:(NSArray *)metadataObjects
fromConnection:(AVCaptureConnection *)connection
{
for (AVMetadataObject *metadata in metadataObjects)
{
AnimationView *cv = [[AnimationView alloc]initWithFrame:self.livevideo.bounds];
[cv setBackgroundColor:[UIColor clearColor]];
cv.rectXY = metadata.bounds;
[location addSubview:cv];
if ([metadata.type isEqualToString:AVMetadataObjectTypeQRCode])
{
NSString *code =[(AVMetadataMachineReadableCodeObject *)metadata stringValue];
NSLog(@"Read QRCODE %@", code);
}
}
}