phonegap/phonegap-plugins — pull request #252 by oswell (2011-11-25 23:23:45+00:00)
Title: Update to allow the iPhone barcode scanner plugin to use a custom xib file for the overlay view.

Updated to allow the user to define a xib file for the interface. The name of the xib file can then be passed into the scan method. In the example below, the actual xib file is called BarcodeOverlay.xib. Also updated the cancel method to be linkable from within the xib.

function scan() {
window.plugins.barcodeScanner.scan(
function(result) {
if (result.cancelled)
alert("the user cancelled the scan")
else
alert("we got a barcode: " + result.text)
},
function(error) {
alert("scanning failed: " + error)
},
["BarcodeOverlay"]
)
}