I have a uitableview 'A' which has cells, on clicking one of the cell, it needs to push another table view 'B'. and now when a cell is clicked in 'B', its needs to open a simple view.
I have managed to display both the tables in two different views. but when a cell is clicked in the menu B. it hangs and shows the below message
> unrecognized selector sent to > instance
could someone please tell me how do i solve this.thanks
Please find below my code
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
NSLog(@"entering the if loop libdecripviewcontoller");
if(self.libraryDescripViewController == nil){
NSLog(@"its creating new instance of libdecripviewcontoller");
LibraryDescripViewController *aLib = [[LibraryDescripViewController alloc] initWithNibName:@"LibraryDescripView" bundle:nil];
self.libraryDescripViewController = aLib;
[aLib release];
}
libraryDescripViewController.title = [NSString stringWithFormat:@"%@",[libraryMenu objectAtIndex:row]];
ULS1AppDelegate *delegate = [[UIApplication sharedApplication] delegate ];
[delegate.searchLibNavController pushViewController:libraryDescripViewController animated:YES];
}
Please find the output below
2010-06-27 20:13:15.521 ULS1[1020:207] entering the if loop libdecripviewcontoller 2010-06-27 20:13:15.533 ULS1[1020:207] its creating new instance of libdecripviewcontoller 2010-06-27 20:13:15.541 ULS1[1020:207] * -[LibraryMenuTabViewController setLibraryDescripViewController:]: unrecognized selector sent to instance 0x3c2ec70 2010-06-27 20:13:15.554 ULS1[1020:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[LibraryMenuTabViewController setLibraryDescripViewController:]: unrecognized selector sent to instance 0x3c2ec70' 2010-06-27 20:13:15.558 ULS1[1020:207] Stack: ( 29303899, 2512004361, 29685819, 29255286, 29107906, 14755, 3050054, 3033220, 287146, 29088448, 29084744, 37393941, 37394138, 2777007, 11184, 11038 )