Emre
Emre

Reputation: 11

iphone barcode reader database integration

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.

Upvotes: 1

Views: 948

Answers (2)

Richard D
Richard D

Reputation: 5665

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.

Upvotes: 1

Crash_Override
Crash_Override

Reputation: 368

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.

Upvotes: 0

Related Questions