I'm creating a barcode reader for my app. I nailed that, yet it's useless if it doesn't to anything with the barcode it reads. What I want to do next is initiate a new View Controller as soon as the function captures the code.
Question is: How can I generate a new view controller as soon as this IF is satisfied?
if metadataObj.stringValue != nil
{
messageLabel.text = metadataObj.stringValue
}
This is the if that prints (in front of the user) the numeric form of the barcode (so when the user points his camera at a barcode, 4058394759 is displayed). Next, I want the app to move to a new view controller where that numeric value is printed and create a button that will generate a google search.
Thing is, I've only connected view controllers using the Interface Builder. How can I make this transition through code?