TableView not showing refresh data from web Service
I have two classes FirstViewController and SecondViewController.On FirstViewController i have TableView and UIBarButton named 'Change City' .TableView is showing parsed data from the server. But when i click on Change City ,It flip us on SecondViewController.
On SecondViewController we have also a TableView which shows the cities and done button.After selecting the city we pressed Done then SecondViewController again flip to FirstViewController.
i Stored selected ci开发者_如何学JAVAty in appDelegate for accessing it on the FirstViewController.
Here Tableview of FirstViewController should have been refreshed but it showing the same data as it was showing earlier.
Please somebody help me to fix this problem.I am doing this from last 2 days.
you need to add this line- [tableView reloadData];
to the method that is called when the view controller is set back to FirstViewController, which would be the viewWillAppear:
/viewDidAppear:
methods.Hope this helps...
精彩评论