pushViewController using UINavigationItem instead of UINavigationController

Posted by jaume on Stack Overflow See other posts from Stack Overflow or by jaume
Published on 2010-03-24T23:22:47Z Indexed on 2010/03/24 23:23 UTC
Read the original article Hit count: 579

Hello, I have implemented a method didSelectRowAtIndexPath that should push another view. I have a code running properly using a navigationController but in this case I am using a navigationItem on a view. How could I trigger a view? Thanx

Error log:

2010-03-25 00:09:52.459 TableArchive[1062:207] trigger 2010-03-25 00:09:52.461 TableArchive[1062:207] * -[UINavigationItem pushViewController:animated:]: unrecognized selector sent to instance 0x3921ca0 2010-03-25 00:09:52.462 TableArchive[1062:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UINavigationItem pushViewController:animated:]: unrecognized selector sent to instance 0x3921ca0' 2010-03-25 00:09:52.463 TableArchive[1062:207] Stack: (

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"trigger");

    if(dvController == nil) { DetailView *aController =[[DetailView alloc]initWithNibName:@"DetailView" bundle:nil];

    self.dvController = aController;

    [aController release]; }

    [[self navItem]pushViewController:dvController animated:YES];

    [dvController release]; }

© Stack Overflow or respective owner

Related posts about pushviewcontroller

Related posts about tableview