views:

25

answers:

1

Hi, everyone,

I want to ask a question about the iPhone application.

In my program, I create the UITabBarController with 4 tabs. The 4 tabs display different information and have some connection. When I do something in the tab 4, it will update some data which display in tab 1. However, the page is the same if I add the element in the viewDidLoad function.

My problem is, how to load the data every time when the user press the tab? do I need to move the code to somewhere?

+2  A: 

[UIViewController viewWillAppear:] is exactly what you're looking for.

Seamus Campbell