views:

48

answers:

2

Hi all.

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.

+2  A: 

In your UITableViewController, you own a UITableView, call reloadData on this tableView will reload your table view's data

[self.tableView reloadData];
vodkhang
i want to reload data by clicking the button laod more 20
Nauman.Khattak
What is your problem? You want to call the method load20, or you want to call the model to retrieve and parse XML
vodkhang
Because, 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]`
vodkhang
+1  A: 

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];
NR4TR