Have worked through the excellent answers here unrecognized selector sent to instance but am still unable to debug this.
error I get is
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController disableTabBarItemWithIndexNo:]: unrecognized selector sent to instance 0x1184dfa0' * First throw call stack:
Setting breakpoint the issue appears to be from here
[appdelegate tabBarController:shouldSelectViewController:]
[tbc disableTabBarItemWithIndexNo:index];
I believe the code causing the issue is this:
- (BOOL)tabBarController:(CustomTabBarController *)tbc shouldSelectViewController:(UIViewController *)viewController {
if ([viewController isMemberOfClass:[ActionViewController class]]) {
NSInteger index = [tbc.viewControllers indexOfObject:viewController];
CGRect frame = [[[self tabBarItemViewList:tbc] objectAtIndex:index] frame];
ActionViewController* content = [[ActionViewController alloc] init];
UIPopoverController* popover = [[UIPopoverController alloc] initWithContentViewController:content];
[content release];
popover.delegate = self;
popover.popoverContentSize = CGSizeMake(popover.popoverContentSize.width, 411.0);
[tbc disableTabBarItemWithIndexNo:index];
// Store the popover in a custom property for later use.
self.currentPopover = popover;
[self.currentPopover presentPopoverFromRect:frame inView:tbc.tabBar permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
return NO;
}
This is now driving me crazy, am sure have everything hooked up in IB correctly, and the custom controller should respond to the method call. Any help very much appreciated!