3

I have working on navigation base application. my problem is that when i am push other view controller into navigation controller .view controller viewWillAppear is not called.

TestCategoryHistory *testVC = [[TestCategoryHistory alloc] initWithNibName:@"TestCategoryHistory" bundle:nil];

[self.navigationController pushViewController:testVC animated:YES];
[testVC release];`

here test's viewWillAppear is not called.And also navigationbar is not showing..

kEvin
  • 411
  • 6
  • 18

1 Answers1

4

make sure your current view controller is "in" a Navigation controller. Only so, you can push another view controller to show.

Wubao Li
  • 1,728
  • 10
  • 13
  • Yes my current view controller is navigation controller and viewdid load is called but problem is that navigation bar is not showing in view. – kEvin Jun 07 '12 at 09:49
  • Did TestCategoryHistory view controller hide the bar? check whether bar hidden setting. self.navigationController.navigationBarHidden = YES; – Wubao Li Jun 07 '12 at 09:56
  • self.navigationController.navigationBarHidden = NO. on viewDidLoad method. But it's not working. – kEvin Jun 07 '12 at 09:59
  • Check this line NSLog(@"Navigation Controller %@",self.navigationController); – Arpit B Parekh Jun 07 '12 at 10:05