table view not loading nib when cell is selected
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.
self.navigationController
may be nil. How was the table view controller added to the navigation controller?
Have you checked if you have imported the header file on the top? And why don't you try to use bundle:[NSBundle mainBundle] ?
精彩评论