Re: Design for custom tableviewcell button action
Re: Design for custom tableviewcell button action
- Subject: Re: Design for custom tableviewcell button action
- From: Alexander Spohr <email@hidden>
- Date: Thu, 25 Jun 2009 11:46:55 +0200
Am 25.06.2009 um 10:54 schrieb WT:
On Jun 25, 2009, at 10:26 AM, Alexander Spohr wrote:
Why didn’t you put the cell into the controllers nib?
Make an outlet in your controller to reach the cell and just return
it when you need it?
Because -tableView:cellForRowAtIndexPath: needs to return a
different cell object for each visible row. Your code above returns
always the same object, the one table view cell archived in the nib,
which means that changing the data in one cell would change the data
in all visible cells, and all visible cells would have the same data
all the time.
Of course, you are right. I forgot that the OP wanted something like
an accessory which needs to be repetitive.
atze
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden