问题
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.
回答1:
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;
}
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
来源:https://stackoverflow.com/questions/29270877/classify-qr-code-with-avfoundation-objective-c