franmarquezr
franmarquezr

Reputation: 53

IOS: Navigation Bar - Reload View Controller

Is there any method to be released when we return to a viewcontroller from navigation bar?

I want to reload the NIB when I return to the screen from the navigation bar.

Is it possible?

thanks

Upvotes: 0

Views: 2535

Answers (1)

Simon Germain
Simon Germain

Reputation: 6844

You might want to take a look at viewWillAppear:animated and viewDidAppear:animated methods in UIViewController. They are called every time a view controller is pushed to display.

- (void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];
    // Reload your data here, and this gets called
    // before the view transition is complete.
}

- (void)viewDidAppear:(BOOL)animated {

    [super viewDidAppear:animated];
    // Reload your data here, and this gets called
    // after the view transition is complete.
}

Upvotes: 2

Related Questions