1

I have VC that links to another VC containing a tableView.

Then form the table view I exit back to the root VC where I also display the items selected in the table VC.

But should I load those items in viewDidAppear or viewWillAppear ?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Kiwo Tew
  • 1,491
  • 1
  • 22
  • 39
  • Do you want to execute the code before the view appears or after? Generally it is cleaner to set everything up before the view appears – Paulw11 Aug 24 '15 at 11:15
  • recommended read: http://stackoverflow.com/questions/5630649/what-is-the-difference-between-viewwillappear-and-viewdidappear – NeverHopeless Aug 24 '15 at 11:18

1 Answers1

0

You should use viewWillAppear for your dynamic code like changes of the tableview-data etc. You can use viewDidAppear for things that should only happen, if the view is already on screen.

Christian
  • 22,585
  • 9
  • 80
  • 106