答案 0 :(得分:0)
以下是一些用于条形码扫描的优秀API:
Scandit Barcode Scanner (not free)
以下是您使用ZBar API的代码片段:
ZBarReaderController *reader = [ZBarReaderController new];
reader.readerDelegate = self;
//... code to get image
CGImageRef imgCG = image.CGImage;
id<NSFastEnumeration> results = [reader scanImage:imgCG];
ZBarSymbol *symbol = nil;
for(symbol in results)
// EXAMPLE: just grab the first barcode
break;
resultText.text = symbol.data;
希望这会对你有所帮助。