-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

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
Parag Sinha
  • 79
  • 2
  • 7
  • 3
    possible duplicate of [unrecognized selector sent to instance](http://stackoverflow.com/questions/2455161/unrecognized-selector-sent-to-instance) – DrummerB Jun 15 '13 at 19:28
  • @H2CO3 Haha :D I just laughed :D – HAS Jun 15 '13 at 19:33

1 Answers1

3

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

Parag Sinha
  • 79
  • 2
  • 7