I'm implementing my own 'back' button. Where onClick
, the following code is executed in the ViewController
(VC) being dismissed:
- Dismiss current VC (VC#1)
- Pop current VC (VC#1) off my custom
navigationStack
- Get the last VC (VC#2) from the
navigationStack
, and present it using
presentViewController
What happens is the back works visually works - i.e. current VC
disappears, previous VC
appears. However, the viewDidLoad
method is not called. So the screen isn't updated with data updates from viewDidLoad
.
[self dismissCurrentViewController:self completion:^{
[TWStatus dismiss];
FHBaseViewController *vcToDisplay = [[FHDataManager sharedInstance] popNavigationStack];
[vcToDisplay.homeVC presentViewController:vcToDisplay animated:NO completion: ^{ }];
}];
Questions:
- I was under the impression that
viewDidLoad
always gets called whenpresentViuewController
is used?? - I 'build' the screen using a method called ONLY from
viewDidLoad
in VC#2. How is iOS displaying the screen without coming intoviewDidLoad
?
btw, I'm not using storyboards. Any help is appreciated!