Possible Duplicate:
How to display an array in reverse order in objective C
I have an NSMutableArray
and this array contains information nicely in UITableView
.
but I want to display latest information first in UITableView
. Right now the earliest information comes first in UITableView
. My code is as follows:
NSMutableArray *entries = [NSMutableArray array];
[self parseFeed:doc.rootElement entries:entries];
for (RSSEntry *entry in entries) {
[allEntries insertObject:entry atIndex:0]; //insertIdx];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationRight];
}
then How can I reverse the information in NSMutableArray
?