Menu

Forward Barcode to a webview

herbo4
2012-10-03
2013-02-02
  • herbo4

    herbo4 - 2012-10-03

    I've tried looking at the zbar iphone app source, but I can't decipher how to forward a scanned barcode to a NSURL in a web view so that the page loads a URL with the barcode in it. I simply want to add the barcode as a php element in my url, but if I make the url a NSURLFromString (I think that's the right syntax, but I could be wrong. I know what I have in my code works) and make that string a result of a concatenation, my web view freezes and the app locks up. Can anyone tel me how to use the barcode to make dynamic links?

     
  • Mike Milzz

    Mike Milzz - 2012-12-13

    I accomplished something similar on iOS6 using segues. As part of the segue setup process you can create the webview controller and then set some properties on that controller before you call it. I know there are other ways using messaging and more complicated things to do this (and perhaps more proper) but look into
    prepareForSegue:
    if([isEqualToString:@"your segue name"]){ }

    Good luck!

     

Log in to post a comment.