Reputation: 885
I'm using a TTLauncherView and for that I declare a view controller as TTViewController, as is in TTCatalog tutorial app. Declare a TTLauncherView var inside that view, add items, and so on.
In my app's main view is a button calling the previous view with the following code:
-(void) switchToButtonOrderingView
{
ButtonOrderingViewController *ButtonOrderingView=
[[ButtonOrderingViewController alloc] initWithNibName:@"ButtonOrderingViewController" bundle:nil];
self.ButtonOrderingViewController = ButtonOrderingView;
[self.view insertSubview:ButtonOrderingView.view atIndex:10];
}
When I press the button the app brakes up at this method which belongs to TTViewController.m:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
UIViewController* popup = [self popupViewController]; //brakes up here
if (popup) {
return [popup shouldAutorotateToInterfaceOrientation:interfaceOrientation];
} else {
return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
}
and the error goes like that:
[ButtonOrderingViewController popupViewController]: unrecognized selector sent to instance
Checked to see Three20 Class Hierarchy and TTViewController is a UIViewController subclass.
popupViewController is a TTPopViewController (and its subclasses) method! Which I'm not using nor do TTCatalog tutorial app. I'm lost. Any help will be appreciated.
Thanks.
Upvotes: 5
Views: 2211
Reputation: 2289
Had the same issue and found the error!
This is what happens when you forget to add -ObjC and/or -all_load to Other Linker Flags according to the Three20 setup instructions. Could be that you added them to the project level, and have an overriding setup at a lower level - that was the case for me.
Upvotes: 8