I've built a large tableview and have found that if I go down a step then click 'back' that the viewdidload function is not called. I need to run a function every time this layer of the UITableView is viewed. Is there a function that will run regardless of whether the view has been previously loaded?
Asked
Active
Viewed 44 times
0
-
1How about `viewWillAppear:`? – rmaddy Jul 16 '14 at 06:00
-
Here you can read about [lifecycle of UIViewController](http://stackoverflow.com/questions/5562938/looking-to-understand-the-ios-uiviewcontroller-lifecycle). – Tomasz Szulc Jul 16 '14 at 07:11
2 Answers
2
viewDidLoad is called once and only once when the view gets loaded. In your situitation, viewWillAppear might not work as well because it's only called only if the view gets loaded on the canvas. You might need to pass a delegate to the table view controller or view.

ABCD
- 7,914
- 9
- 54
- 90
1
You can use :
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}

mvadim
- 152
- 6