I am trying to get a pop up menu on iPhone. The main app is using storyboard, but the pop up is a separate xib file that I load:
menu = [[UIViewController alloc] initWithNibName:@"SimpleMenuController" bundle:nil];
[self.view addSubview:menu.view];
and I slide it in and out with animation when pressing a button.
that works fine, but I get a problem when I try to press a button inside that pop up menu
I get the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UIViewController PressCategory:]:
unrecognized selector sent to instance 0x8d3c040'
I have connected the button to PressCategory
function
I have connected the view to the file owner.
What I have noticed is that my ViewController
is called SimpleMenuViewController
, that is where the PressCategory
function is, so of course it will not find the selector. But I don't know what I am doing wrong in connecting in the xib
file.