So there is a problem in prepare.
Instrument more the code:
Code Block override func prepare(for segue: UIStoryboardSegue, sender: Any?) { |
print("segue identifier", segue.identifier) |
if segue.identifier == "r" { |
let hockeyDetailVC: HockeyDetailVC = segue.destination as! HockeyDetailVC |
hockeyDetailVC.delegate = self |
} |
} |
and tell what you get.If you get something different from
segue identifier r
such as
segue identifier R
or
segue identifier SomeString
that means that "r" is not the identifier of this segue.
Then change "r" by what you got here after "segue identifier"
Note:
Code Block print("invoked HockeyDetailVC is", self) |
gives me invoked HockeyDetailVC is <LearnHockey.HockeyDetailVC: 0x7fe0b3026200>. Can you explain the 0x7fe0b3026200.
0x7fe0b3026200 is simply the address o self.
The point would be to compare with the instance in HockeyDetailVC viewDidload
But the problem is most likely in prepare.