Search code examples
iphoneuiviewcontrollerlifecycle

What function is definitely to be called in UIViewController whenever the view is shown?


What function is definitely to be called in UIViewController whenever the view is shown in iPhone application development, including after hitting the "last view" button in a NavigationViewController?

I am getting some unsynchronized information with views using NavigationViewController. I am wondering if I can place a function call to refresh the data in the view life-cycle function that is to be called everything the view shows up.


Solution

  • - (void)viewWillAppear:(BOOL)animated; may fit your need.