I am building a small application with the following structure:
AppDelegate: Loads the menu Controller
MenuController:
Controls 4 menu items that are created in the xib file
A xib file with the following structure
– view
– Image View (Background)
– Second View (MiddleView)
– Navigation Bar
– segmentedControl
TrackController: Is getting load by the MenuController
I load the page with the following code:
TracksController *currentView = [[TracksController alloc] initWithNibName:@"TracksController" bundle:nil];
[MiddleView addSubview:currentView.view];
[currentView release];
The errormessage what I got is:
2009-11-17 11:25:17.336 Par23[1883:20b] * -[NSCFType playNow:]: unrecognized selector sent to instance 0x48361e0
2009-11-17 11:25:17.337 Par23[1883:20b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFType playNow:]: unrecognized selector sent to instance 0x48361e0'
playNow is a IBAction in TracksController.
I think my problem is my logica. And that the view within the view isn't the way how you should work.
This because it isn't a problem within the button IBAction.
I hope I explained it enough
Best Answer
The first thing I would check is that you haven't made the case mistake you made in your post.
playNow:
is not equal toPlayNow:
.Second thing I would check is does the TracksController or the button which connects to
playNow:
have multiple connections attached. You check this in IB, using the connections panel.If those don't help, does TracksController trigger playNow programmatically at all?
Maybe, since you've stacked up views, a method selector is getting passed to the wrong viewcontroller?