how to reload table view in iphone application
Solution 1
In your UITableViewController
, you own a UITableView
, call reloadData
on this tableView
will reload your table view's data
[self.tableView reloadData];
Solution 2
It's not clear for me why you push self? First you should refresh the table data, which is used for table data source and then call. Assume myEntriesProvied is an instance that provides you with new entries and myEntries is an array of entries that is used as data source of your table view:
self.myEntries = [myEntriesProvider getNewEntries];
[self.tableView reloadData];
Comments
-
Nauman.Khattak almost 2 years
I am displaying 10 feed in UItable view and below i have added a button with name load more 20.. by clicking this button i am passing argument to the xml and in return i want to reload the table view with fresh content. welll my question is that how to the view again.
i am trying somthing like this
-(IBAction)loadMore20 { //myview.hidden = FALSE; //[myview startAnimating]; feedurl = @"http://www.luxury.net/feed/index_blatest.php?more=10"; NavigationTitle =@"Luxury.net - Babes"; [self.navigationController pushViewController:self animated:YES]; }
Thanks in Advance and sorry for my bad english.
-
Nauman.Khattak over 13 yearsi want to reload data by clicking the button laod more 20
-
vodkhang over 13 yearsWhat is your problem? You want to call the method load20, or you want to call the model to retrieve and parse XML
-
vodkhang over 13 yearsBecause, your last question is "in return i want to reload the table view with fresh content", then what I understand is your want to call
[tableView reloadData]