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

Title label does not grow to size #34

Closed
damionvega opened this issue Dec 24, 2015 · 3 comments
Closed

Title label does not grow to size #34

damionvega opened this issue Dec 24, 2015 · 3 comments

Comments

@damionvega
Copy link

I've been having a hard time figuring out the self-sizing cells for the past two days. I think I've re-read your answer here on SO 20 times; I want to say I understand how this works, but I can't get this to work for the life of me.

I finally got fed up, wiped out all of my work, copy-pasted the UITableViewCell & UITableViewController subclasses from this project into mine and get the following:
screen shot 2015-12-23 at 10 24 44 pm

Here's my cell and controller (basically copy-paste besides the label text):
screen shot 2015-12-23 at 10 24 24 pm

And my storyboard attributes so you know no funny-business is going on there:
screen shot 2015-12-23 at 10 31 14 pm
screen shot 2015-12-23 at 10 31 20 pm

@damionvega
Copy link
Author

I had also toyed with:

  • The code inside layoutIfNeeded() in the tableViewCell class
  • Updating the cell frame & contentView bounds in the cellForRowAtIndexPath in the tableViewController (commented out)
  • Setting the preferredMaxLayoutWidth for both labels

After looking at the other issues, no luck so far.

@AndroidLTG
Copy link

me too

@damionvega
Copy link
Author

@AndroidLTG Take a look at this, it's the simplest I could make it without wiping out all of my work. Just pay attention to titleLabel & descriptionLabel and you should be in Dynamic Cell Height Heaven: https://gist.github.com/damionjn/85e2b17cdcde07ca4533

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