ZYThumbnailTableView
ZYThumbnailTableView copied to clipboard
Clearer Description of how to Create Expandable Cells
I've just been using the ZY Thumbnail Table View and love what its capable of. One issue I was stuck on was designing custom table view cells that expanded correctly when clicked on.
I finally managed to get expanding table cells by ensuring the text label had 'Lines' set to 0, and Line Breaks set to 'Word Wrap'. In the hierarchy I had a single child view of the Content View which was pinned to the top, bottom, left and right of the superview. Inside the view were the child elements, including the text block I wanted to expand. Each of these child elements was separated by a vertical spacer. The last two elements were my expanding text label, and a 'dummy' image view (as shown in the Demo).
I thought it might be helpful to future users trying to make their table cells expand correctly, as I've spent a few hours trying to get it right.
is your problem with the incorrect height of UILabel calculated by system?
it is a bug of Apple, With all correct AutoLayout Constraint,we need calculate the height of UILabel by ourself with -boundingRectWithSize:option:attribute:context: