how to reload table view in iphone application
I am displaying 10 feed in UItable view and below i have added a button with name loa开发者_Go百科d 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.
In your UITableViewController
, you own a UITableView
, call reloadData
on this tableView
will reload your table view's data
[self.tableView reloadData];
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];
精彩评论