swiftxcodesegue

Segue not working in Xcode (beginner question)


The "print("test prepare")" line is not being triggered when I click between views. Please can someone tell me why? (I am trying to follow the instructions in "Beginning iOS 16 SWIFT" by Greg Lim (chapter 3: quotes app using table views))

Many thanks for any pointers! :-)

enter image description here

enter image description here


Solution

  • Your images show this code:

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        print("test prepare")
    }
    

    inside the QuoteDetailsViewController class. It should be in the QuoteTableViewController class.