iPhone条码阅读器数据库集成
我正在尝试开发一个 iPhone 应用程序,它将扫描条形码并在数据库中搜索并显示结果。事实上我完成了大部分。 我可以扫描条形码(我正在使用 zbar 条形码阅读器)并获取文本字段上的条形码编号,但为了搜索我的数据库,我需要按我创建的按钮。 我需要做的是扫描条形码并且数字显示在文本字段上后,立即在数据库中进行搜索,无需按按钮并将结果显示在其他文本字段上。
谢谢。
I am trying to develop an iphone app which will scan a barcode and search it in the database and display the results. Actually i accomplished most part of it.
I can scan the barcode ( i am using zbar barcode reader ) and get the barcode number on the textfield but in order to search on my database i need to press a button i created.
What i need to do is after the barcode is scanned and the number is displayed on textfield get the search on the database immediately without need of pressing a button and display the results on other textfields.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当 zbar 成功识别条形码时,它会触发其委托中的
imagePickerController:didFinishPickingMediaWithInfo:
方法。您可以在该方法中放置任何进一步的操作(例如将代码发送到 Web 服务,或隐藏视图等)。When zbar successfully recognizes a barcode, it triggers the
imagePickerController:didFinishPickingMediaWithInfo:
method in its delegate. You can place whatever further actions (such as sending the code to a web service, or hiding the view, etc.) within that method.为什么不让它在扫描仪收到有效条形码的肯定确认后进行搜索。当扫描被接受时,它将立即从那里自动搜索。
Why not make it do the search after the scanner recieves a positive confirmation as a valid barcode. When the scan is accepted it will autosearch right from there.