In rootcontroller there is a tableview (with two A and B), click on one of the A to open new view (also a tableview, there are data C and D). Then click navigationcontroller top return, and then click the B, C, and still shows D. After clicking B has confirmed that data has been updated (it should be E and F), but the interface is still displayed on the A's data (C and D).
Neighborhoods should be done to show how the new data E and F? ?
Reply:
Are you a new view that the two should be the same view, populated with data when you judge what is now populated with the data? Tieshanglai see the code
Reply:
- (Void) viewWillAppear: (BOOL) animated
{
[Super viewWillAppear: animated];
[Self.tableView reloadData];
}
Reply:
viewWillAppear tried, to no avail
Since the code too much, probably this: http://blog.csdn.net/pjk1129/article/details/6561781
For example, after clicking A, uitableview interface display C and D, and then click back B, uitableview interface as if the data of the B E and F are appended, and instead of the original C and D cleared. But actually obtained after clicking B data is not included in the data A.
Maybe should'm asking the question: how clear the original data displayed in uitableview? With reloadData does not work.
Reply:
Carefully look at your tablecell spread click event in the next view of the data if they're right.
Reply:
If you are using uinavgationcontroller, after the return of that view once the view is destroyed, what about the data stored in it can be displayed again. Should be populated when you click on B data in question, a closer look after you click on B what used to fill the data.
URL you give others tableview are a viewcontroller inside. You said it yourself related to the uinavgationcontroller, should be two viewcontroller up, reloadData purely superfluous.
Reply:
Will be destroyed after the return of the original do? Seems to be no bar. Click A later pushViewController display the new view, and the view of the slider to the middle position; then return, click again to open the view A data is still displayed in the just return to the previous state. If it is destroyed, it should be the top-most display data bars.
Reply:
Are you sure you pass parameters yet? Since the two push the same view. Then you want to pass in front of this view are at least one parameter over. Then this latter view inside the talbe to know what data the load
Reply:
I used the stupid way to solve is to return after clicking on A, then click B after loading the data before using deleteRowsAtIndexPaths of the previous row (A data) can be fully deleted.
Reply:
You can use - (void) navigationController: (UINavigationController *) navigationController willShowViewController: (UIViewController *) viewController animated: (BOOL) animated {}
Then determine navigationController.viewControllers.count is equal to one to determine the current location is not in the root of
But now only judge that. . .
I do not understand, then email
yy.is.ing @ gmail.com
No comments:
Post a Comment