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**
}