Reputation: 23
I'm a new iphone developer, question is I want to know the sym.data 's type. Is it codebar or qrcode?
- (void) readerView: (ZBarReaderView*) view
didReadSymbols: (ZBarSymbolSet*) syms
fromImage: (UIImage*) img
{
//do something useful with results and display resultText in resultViewController
for(ZBarSymbol *sym in syms) {
imageResult3.image = img;
**resultText3.text = sym.data;**
//return resultText;
break;
}
}
Upvotes: 2
Views: 1354
Reputation: 26
sym.typeName is what you want...
resultText.text = sym.typeName;
resultText.text = [ resultText.text stringByAppendingString:@" - " ];
resultText.text = [ resultText.text stringByAppendingString:sym.data ];
Take a look at the ZBar documentation, at the ZBarSymbol Class Reference.
Upvotes: 1