使用AVFoundation-目标C对QR代码进行分类

问题描述:

我是QR码新手. 我使用AVFoundation检测QR Code并将其解码为文本. 我想问一个问题:我怎么知道文本是链接,联系人还是电话号码,... 我的意思是:有了QR码,我可以知道使用AVFoundation的类型是什么吗? 对不起,我的英语不好.

I'm new with QR Code. I use AVFoundation to detect QR Code and decode it to a text. I want to ask that: How can I know the text is a link or a contact or a number,... I mean: With a QR code, can I know what type is it with using AVFoundation? Sorry for my bad english.

在QR码中,您可以单独使用扫描仪阅读文本,如果您需要在xcode中阅读文本,则需要使用代码.

In the QR code, you can read the text by using a scanner seperately and if you need to read the text in xcode then you need to use this piece of code.

- (BOOL)startReading {
    NSError *error;

    AVCaptureDevice *captureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];

    return YES;
}

因为此AVFoundation用于捕获运动图像,所以我们可以捕获QR码,然后才能读取它.为了进一步参考,您可以查看 如何使用AVFoundation框架扫描QR码

since this AVFoundation is used to capture motion picture we can capture the QR code and then we can read it. For further reference you can look in to How To Scan QR Code Using AVFoundation Framework