Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer Description of how to Create Expandable Cells #14

Open
tjw0051 opened this issue Aug 29, 2016 · 2 comments
Open

Clearer Description of how to Create Expandable Cells #14

tjw0051 opened this issue Aug 29, 2016 · 2 comments

Comments

@tjw0051
Copy link

tjw0051 commented Aug 29, 2016

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.

@liuzhiyi1992
Copy link
Owner

is your problem with the incorrect height of UILabel calculated by system?

@liuzhiyi1992
Copy link
Owner

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants