开发者

TableView not showing refresh data from web Service

开发者 https://www.devze.com 2023-03-15 01:02 出处:网络
I have two classesFirstViewController and SecondViewController.OnFirstViewController i have TableView and UIBarButton named \'Change City\' .TableView is showing parsed data from the server. But when

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消