Invalid argument exception - Navigation bar, tab bar, UIView.

Posted by Tejaswi Yerukalapudi on Stack Overflow See other posts from Stack Overflow or by Tejaswi Yerukalapudi
Published on 2010-04-14T18:16:44Z Indexed on 2010/04/14 18:53 UTC
Read the original article Hit count: 380

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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about pushviewcontroller