ZXing problem when find qr code that does not know
I have a question ... I am using ZXing lib to recognize two types of QRCode (for iphone application) everything works fine .... I use this method to analyze the results:
- (void)zxingController:(ZXingWidgetController*)controller didScanResult:(NSString *)result {
if([result isEqualToString:@QRCODERESULT_TYPPE_01])
{
...CASE 01
}
else if([result开发者_开发技巧 isEqualToString:@QRCODERESULT_TYPPE_02])
{
... CASE 02
}
}
This code works fine if I find a QRCode type 01 or 02 but when I try with another QRCode not know the controller is still some green squares ... how can I reset the controller when it reads a QRCode I do not care? txy
Dismiss the qr scanning controller regardless of whether the scanned QR code is the one you want or not.
- (void)zxingController:(ZXingWidgetController*)controller
didScanResult:(NSString *)result {
// always dismiss the qr controller
[self dismissModalViewControllerAnimated:NO];
if (qr code is of type 1) {
// do something if qr 1
}
else if (qr code is of type 2) {
// do something with qr 2
}
}
精彩评论