开发者

Objective-c stackflow

开发者 https://www.devze.com 2022-12-11 21:15 出处:网络
I am building a small application with the following structure: AppDelegate: Loads the menu Controller

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. T开发者_运维百科his because it isn't a problem within the button IBAction.

I hope I explained it enough


The first thing I would check is that you haven't made the case mistake you made in your post. playNow: is not equal to PlayNow:.

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号