macgeezer
macgeezer

Reputation: 484

How can I update a view in the iPhone every time just before the view is displayed?

I have an application which has 7 tabs with associated views and view controllers. I need a way to update each view when it is selected. I have searched and searched, but cannot find a way to do this.

viewDidLoad will not work, as that only is fired the FIRST time a view is selected.

Capturing the selected tab in didSelectViewController won't work, because since there are more than 5 tabs, one of them is more and it is only fired for the tab itself, not underlying views when selected.

So I guess what I need to know is this: Is there a method I can call for on a view controller that will fire EVERY time just before that view is shown?

Upvotes: 3

Views: 459

Answers (1)

Vladimir
Vladimir

Reputation: 170829

You need to implement delegate's -viewWillAppear:(BOOL)animated method for that.

Upvotes: 5

Related Questions