3
NewViewController_iPhone *newViewController = [[NewViewController_iPhone alloc] initWithNibName:@"NewViewController_iPhone" bundle:nil];


[self.navigationController pushViewController:newViewController animated:YES];

viewWillAppear: and viewDidAppear: are not called in NewViewController_iPhone. Why not?

Daniel
  • 23,129
  • 12
  • 109
  • 154
soleil
  • 12,133
  • 33
  • 112
  • 183
  • This has been answered a lot of times. Please check out this: http://stackoverflow.com/questions/131062/iphone-viewwillappear-not-firing http://stackoverflow.com/questions/3953192/viewwillappear-is-never-called-till-i-load-a-modal-view-controller-in-the-of-th http://stackoverflow.com/questions/1065978/push-view-controller-into-navigation-controller – Daniel Aug 20 '12 at 22:12
  • None of these really have a definitive answer. I just quit xcode and reopened the project, and now these methods are getting called without calling them manually... – soleil Aug 20 '12 at 22:29
  • Seems to just be a bug then, sorry about that. Usually these don't get called when setting a view controller as the root of the navigation or the root view controller of the window. But isn't the case for pushViewController:animated: – Daniel Aug 20 '12 at 22:31

0 Answers0