tags:

views:

21

answers:

2

i have the following code

 if ([[tableView cellForRowAtIndexPath: indexPath].textLabel.text isEqualToString: @"added"]) {
    NSLog (@"hello");
    FinalViewController *anotherViewController = [[FinalViewController alloc] initWithNibName:@"FinalViewController" bundle:nil];
    NSLog (@"hello2");

    [self.navigationController pushViewController:anotherViewController animated:YES];
    [anotherViewController release];
    NSLog (@"hello3");

and it does absolutely nothing on user click. when testing it, all logs appear so im not sure where the problem is located.

+1  A: 

self.navigationController may be nil. How was the table view controller added to the navigation controller?

Brian
i solved it it because i forgot to add the navigational controller to the view .
Alx
A: 

Have you checked if you have imported the header file on the top? And why don't you try to use bundle:[NSBundle mainBundle] ?

Matthew