Hi, dear fellows,
I am having a problem about using navigation controller and the sub views.
Here is the brief description about my program(Source code is too much to show, and I will describe the main idea behind my app.)
a. I created a UITabBarController with 8 sub views.
b. 6 of the 8 sub views are UINavigationController.
c. I created the UINavigationController by using initWithRootViewController.
d. I added a UITableView in the root view controller of the navigation controller and read some hierarchy data which is the top level of my data structure and supposed to be shown on on the table view [d].
e. I added another UIViewController which is works as same as the [d] one(That's means it also has an UITableView.), when I touch a cell in [d], I will push this subview [e] to the navigation controller and show the level 2 data of my data structure.
[Till here, it all works fine! Here comes the problem.]
f. When I touch the "Back" button in the table view [e], it correctly returns to the root view and shows the level 1 data. BUT, then it will be freeze and crashed in a few seconds. So I added a reference of the sub view controller [e] to the root view controller [d]. Then, the application will not be crashed any more, but the problem occurred : I CAN NOT update the sub view contents! It always only show the data when it was first appeared.
I know it's some kind of data cache, but how can I update the sub view when it will be used next time? I had tried [UIView setNeedDisplay] in the delegate method viewWillAppear in the view controller [e], but it didn't work. So, fellows, please give me some fresh air....
Thank you!
I am having a problem about using navigation controller and the sub views.
Here is the brief description about my program(Source code is too much to show, and I will describe the main idea behind my app.)
a. I created a UITabBarController with 8 sub views.
b. 6 of the 8 sub views are UINavigationController.
c. I created the UINavigationController by using initWithRootViewController.
d. I added a UITableView in the root view controller of the navigation controller and read some hierarchy data which is the top level of my data structure and supposed to be shown on on the table view [d].
e. I added another UIViewController which is works as same as the [d] one(That's means it also has an UITableView.), when I touch a cell in [d], I will push this subview [e] to the navigation controller and show the level 2 data of my data structure.
[Till here, it all works fine! Here comes the problem.]
f. When I touch the "Back" button in the table view [e], it correctly returns to the root view and shows the level 1 data. BUT, then it will be freeze and crashed in a few seconds. So I added a reference of the sub view controller [e] to the root view controller [d]. Then, the application will not be crashed any more, but the problem occurred : I CAN NOT update the sub view contents! It always only show the data when it was first appeared.
I know it's some kind of data cache, but how can I update the sub view when it will be used next time? I had tried [UIView setNeedDisplay] in the delegate method viewWillAppear in the view controller [e], but it didn't work. So, fellows, please give me some fresh air....
Thank you!