Tag: 无符号整数

将扫描的条码值解码为整数值

当我扫描条形码,如果它是等于= 2 ,我得到一些价值,那么我需要显示== ,如果它是等于= 3,那么我需要显示= ,如果值是4则无效。 但扫描条形码是整数值 – 当使用NSASCII解码时, NSASCII显示直到值127 ,然后显示无效结果。 例如:如果我的条形码值= 9699 ,结果值= jem那么我添加的结果值= jem= actualstring值= %å åasc值id只显示37 这是我的代码: – (void) readerView:(ZBarReaderView *)view didReadSymbols:(ZBarSymbolSet *)syms fromImage:(UIImage *)img { // do something useful with results — cool thing is that you get access to the image too for (ZBarSymbol *symbol in syms) { [resultsBox setText:symbol.data]; […]