Learn Courses My Dashboard

Trying To Use Button To Transfer A String

I am trying to transfer a name from a UITableViewController to another UITableViewController. I already transferred the same thing too but the button was a nav Item this time the button is in my TableViewCell and it does not work (error is unrecognized selector sent to instance 0x7f81d4033c00). How do I use a segue to transfer it?

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    let nextView = segue.destination as! HighlightsVC
    if segue.identifier == "hs"{
        print("this is what I am bringing to HighlightsVC \(String(describing: currentFav?.yahooName))") //does not print
        nextView.playerName = (currentFav?.yahooName)! 
            }
        }

In my cell

   @IBAction func CamButtonA(_ sender: UIButton) {
        //I am not sure what to put in here but the name this time is **name.text**
    }

usually an “unrecognized selector” error might mean that its not initialized properly… or you forgot to connect your button element to your custom table view cell