Permalink
Browse files

added a comment where I think you would want to execute your js callb…

…ack. (untested)
  • Loading branch information...
1 parent dfcdf40 commit 67d0fd2f7d788096c5387e66d50e6e80158ae165 @happyboredom committed Dec 28, 2010
Showing with 7 additions and 0 deletions.
  1. +7 −0 ZbarPlug.m
View
@@ -43,6 +43,13 @@ - (void) imagePickerController: (UIImagePickerController*) reader
symbol.data];
[ webView stringByEvaluatingJavaScriptFromString:retStr ];
+ // if you need a javascript callback I would put it here (example)
+ // the callback can use the barcode data that was stored in window.plugins.ZbarPlug.data
+ // NSString* callbackStr = [ NSString stringWithFormat:@"window.plugins.ZbarPlug.finished_callback()"];
+
+ // this will execute the your javascript callback
+ //[ webView stringByEvaluatingJavaScriptFromString:callbackStr ];
+
[info objectForKey: UIImagePickerControllerOriginalImage];
// ADD: dismiss the controller (NB dismiss from the *reader*!)

1 comment on commit 67d0fd2

I tested the callback functionality and it is working very fine!

Please sign in to comment.