0

I have an XIB that I present as a modal view. I have a button that calls the following -

(IBAction)dismissVC:(id)sender {
    [self.parentViewController dismissModalViewControllerAnimated: YES];
}

When I press it the app crashes with this notice -

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController dismissVC:]: unrecognized selector sent to instance 0x8379350'

The thing I noticed is that I have a ViewController.xib file and I have this MapView.xib that is a modal VC I want to dismiss. It's presented from a ViewController.xib

What could be the possible issue? I've hooked up all the actions and the File Onwer thing as well. Thanks in advance!

Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120

1 Answers1

2

Try this:

unrecognized selector sent to instance

that might be your solution.

Community
  • 1
  • 1
MasterRazer
  • 1,377
  • 3
  • 16
  • 40