-2

I'm getting this error when passing values from one viewcontroller to the next:

"unrecognized selector sent to instance 0x1f5ea840"
"'NSInvalidArgumentException', reason: '-[UIViewController setContainerToLocationFromResultVC:]: "

I've created a strong property in the 2nd VC and it seemed to work well until I made some modifications to use Container View.

Here's my code:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

if ([[segue identifier] isEqualToString:@"resToContainerSegue"]) {
containerViewController *containerVC= segue.destinationViewController;

containerVC.container_toLocationFromResultVC=self.toLabel.text; // also tried "toLabel.text" but no use.

containerVC.container_fromLocationFromResultVC=self.fromLabel.text;
}
}

Please let me know if I need to provide any more specific. I'd be very glad for any help. Thanks in advance

2

1 Answer 1

3

I got the answer: My destination viewController was not pointing to the proper class. Thanks everyone for helping :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.