Re: Using table view cells from nibs
Re: Using table view cells from nibs
- Subject: Re: Using table view cells from nibs
- From: Quincey Morris <email@hidden>
- Date: Sat, 29 May 2010 01:32:39 -0700
On May 28, 2010, at 23:39, Tino Rachui wrote:
> I've created a table view cell in interface builder with a custom height. However when I load and use that kind of cell at runtime it disregards my custom height. I have to use 'heightForRowAtIndexPath' to set the desired cell height. Is there anything I'm missing?
Well, the row height and the cell height are different things. The table view's built-in behavior places the cell at the top (AFAIK) of the row height.
A custom cell can place itself at the vertical center (for example) of the row height, but that doesn't help you. You *need* to use 'heightForRowAtIndexPath' to make the rows tall enough for your custom cells. (Or, if possible, just set a larger row height in the table view in IB, if a single height works for all rows.)
_______________________________________________
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