xcodeswiftuiviewcontrollerseguersbarcodes

Passing data forward to destination VC (with framework) in Swift?


I'm writing an application that takes data from a QR code scanner. I am just implementing the basics, and have a second view controller that is triggered when a new QR code is detected. The following code is in a custom view controller from RSBarcodes and implemented using CocoaPods.
It won't compile with the error

"Use of undeclared type SecondViewController".

I tried making my SecondViewController public, restarting XCode, and nothing has worked. Any help is appreciated. Thank you!

override public func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    let destinationVC = segue.destinationViewController as! SecondViewController
    destinationVC.label = "test"  

}

SOLUTION:

Added to "Copy Bundle Resources" and then my VC was immediately recognized by the compiler.


Solution

  • SOLUTION:

    Added to "Copy Bundle Resources" and then my VC was immediately recognized by the compiler.