Also, the cell "types" are determined by the string you provide in initWithFrame:reuseIdentifier:

Each unique identifier will have its own reuse pool which can later be recalled by using the same string with dequeueReusableCellWithIdentifier:

The idea is that cells that have the same basic layout will be typed the same. If you have a couple different cell layouts, then you should use a couple different type identifiers. The goal should be that after you dequeue a cell, all you need to do is update it with the data from your data source - you shouldn't need to layout views at that point.

Luke

On May 15, 2009, at 7:56 AM, Dave DeLong wrote:

A different cell instance is used for each visible row. The point of the queue is so that you don't have to instantiate a new cell for every row in your table. The UITableView will "recycle" old cells (ie, cells that are no longer visibly on the screen) when it is about to display a new cell. This helps keep the overall memory footprint down.

Dave

On May 15, 2009, at 8:52 AM, Mike Manzano wrote:

In the template UITableViewController that instantiates cells by first attempting to dequeue them, is that same dequeued cell used to draw all visible rows, or is there a separate cell used for each row? The docs I've read mention queueing different cells of different types, so it's obvious in that case that the cells are different.

If it's the case that only one cell is used, then how do you handle the state related to, e.g., animating or touch tracking?


Mike Manzano
Sent while mobile
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to luket...@apple.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to