Set TTTableMessageItemCell height dynamically based on its content #674

wants to merge 1 commit into


None yet
2 participants

cglong commented Sep 7, 2011

Right now, the height of TTTableMessageItemCell is hard-coded to be 90 pixels. This usually works, but in my case, I didn't want to display a caption. This led to 15 pixels of whitespace at the bottom of every cell.

This implementation assumes there's a title, like other item cells. It checks if there's a caption and/or text and increases appropriately. It also checks if an image is present and overrides the height if necessary.

I chose to multiply kTableCellVPadding by 1.5 rather than 2 to not break existing uses of this cell. I think it also "looks" better being 90 pixels high, as opposed to 95.


jamesgpearce commented Nov 18, 2013

Facebook has not maintained or supported Three20 for some time, and we are closing its old and outstanding pull requests.

Many, many thanks for your support of the project. If you have any further questions, please don't hesitate to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment