I have a navigation view controller and I am using popViewControllerAnimated(true)
to show the view controller shown before. It works but I need to call the viewDidLoad
of the before shown view controller to reload a table view. The viewDidLoad
is not called when using popViewControllerAnimated(true)
. What should I do to call it then.
Asked
Active
Viewed 3,022 times
3
-
1Perhaps you should be looking at viewDidAppear or viewWillAppear? viewDidLoad was likely called much earlier than you are expecting. – David Hoelzer Feb 06 '16 at 20:22
1 Answers
7
You can use the viewDidAppear
or viewWillAppear
methods in view lifecycle to reload the data in your tableview.

mohonish
- 1,396
- 1
- 9
- 21
-
-
3`viewWillAppear` is called just before the view is about the be rendered on screen. `viewDidAppear` is called after the view has already been rendered on screen. – mohonish Feb 09 '16 at 04:46