Invalid argument exception - Navigation bar, tab bar, UIView.
- by Tejaswi Yerukalapudi
Class 1 has the following code that generates the exception -
-(IBAction) searchAllAction: (id) sender {
AddDiagSearchController *search = [[AddDiagSearchController alloc] initWithNibName:@"DiagSearch" bundle:nil];
[self.navigationController pushViewController:search animated:YES];
}
the pushViewController part generates the following exception -
2010-04-14 14:03:31.060 Nav[10314:207] *** -[UIView addTarget:action:forControlEvents:]: unrecognized selector sent to instance 0x3956a80
And the class I'm trying to push has the following code. All the connections for IBOutlets were made through the interface builder. It's has a tableView, search text bar and a tabbar at the bottom and I'll be adding this to a UINavigationController.
@interface AddDiagSearchController : UIViewController <UITableViewDataSource, UITableViewDelegate>{
UIBarButtonItem *quickAdd;
UIBarButtonItem *searchAll;
UITextField *searchTxt;
}
@property (nonatomic, retain) IBOutlet UITextField *searchTxt;
-(IBAction) searchAllClicked:(id) sender;
-(IBAction) quickAddClicked:(id) sender;
-(IBAction) searchBtnClicked;
-(IBAction) resignResponder: (id) sender;
@end