UITableView load cells reverse?

Maybe you should perform it at your table's data source method: (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... NSUInteger row = indexPath row; NSUInteger count = listData count; // here listData is your data source cell.textLabel. Text = listData objectAtIndex:(count-row-1); return cell; }.

Maybe you should perform it at your table's data source method: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... NSUInteger row = indexPath row; NSUInteger count = listData count; // here listData is your data source cell.textLabel. Text = listData objectAtIndex:(count-row-1); return cell; }.

I think it should be (count-1-row). – DyingCactus May 11 '10 at 2:39 you're right. :) my mistake.

I'll update that. – Elliot Chen May 11 '10 at 2:41 This will be accessing the opposite number in the data? – Jaba May 11 '10 at 3:03 I think so.

If you use NSArray or its subclass to hold your data source. And also you can use 'reverseObjectEnumerator'. If you use other kind of data structures to hold your data, you need to use a corresponding 'reverse' accessing method.

– Elliot Chen May 11 '10 at 3:41 (count-1-row) and (count-row-1) isn't that the same? It's like (10 - 1 - 4) and (10 - 4 - 1) that would both give the difference of 5. – Jay Q.

May 11 '107 at 6:55.

By learning core data, I forced myself to learn how strong/weak references matter, how/where/when to use GCD (Grand Central Dispatch), why/how to use notifications, how/why/where to pass objects around, how controllers and views behave, how UITableViewController and UIViewController work, etc. etc. I mean, you learn so much from this that its ridiculous. I’m going to say that this will need to be a 2 part serious here because I’m getting tired. I’ll finish this post in a followup (and hopefully start diving into the other areas of the language).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions