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 10:26:47 +0200
Am 25.06.2009 um 10:16 schrieb WT:
I had exactly the same problem and here's how I solved it.
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?
The second nib seems to much work. And you get a speed bump by loading
it.
- (UITableViewCell*) tableView: (UITableView*) table_view
cellForRowAtIndexPath: (NSIndexPath*) index_path
{
static NSString* cellID = @"cellID";
CustomCell* cell = (CustomCell*) [table_view
dequeueReusableCellWithIdentifier: cellID];
if (cell == nil)
{
cell = customCellOutlet;
// other one-time cell configuration stuff here
}
// per-cell configuration stuff here
}
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