viewDidLoad
is called exactly once, when the UIViewController
is first loaded into memory. This is where you want to instantiate any instance variables and build any UIViews
that live for the entire lifecycle of this UIViewController
.
In UITabBarController
also the viewdidLoad
for UIViewController
is called once, when you are switching tabs.