UIViewController throwing unrecognized selector exception on prepareForSegue
问题 I'm trying to follow along the Stanford CS193p iOS programing lectures. One of the demo programs, called "Happiness" creates two UIViewControllers, a "PsychViewController" and a "HappinessViewController." It segues from the PsychViewController to the HappinessViewController using a target action method. The following code keeps throwing this exception: "-[UIViewController setHappiness:]: unrecognized selector sent to instance" Here's the offending code: -(void)prepareForSegue: