Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEric M
2,242 PointsCan't get height of UITableView Cell to be respected. I have watched build-a-diary-app>custom-uitableviewcell twice.
I have autolayout off. I reverified all the options. I log out the height that is calculated by THEntryCell heightForEntry
. This all looks correct.
The body text extends outside the range of the table cell. and the table cell itself does not grow in height.
Maybe this has to do with new versions of iOS, but I'm not equipped to tell.
Eric M
2,242 PointsIt sort-of works if I do an autolayout solution as suggested in this link: http://www.appcoda.com/self-sizing-cells/
But this has nothing to do with the height calculation method Ash uses (I turned it off). That method should still work, I think a checkbox is just missing somewhere.
3 Answers
Caleb Kleveter
Treehouse Moderator 37,862 PointsI think all you need to do is allow more lines for the text in the attributes inspector ( I think that's the one it's in).
Donny Gumelar France
Courses Plus Student 1,148 Pointsare u already solve this problem by that ? are that gonna work ? where exactly we need add more line ?
Eric M
2,242 PointsI don't think so. For auto-line height detection, 0
is the correct number of lines. I think springs/struts doesn't work the way the video indicates, and I'm not sure how it works now.
I have it working with autolayout but want to understand the springs/struts way to do this.
Donny Gumelar France
Courses Plus Student 1,148 Pointsis that no other choice for this problem ? , i can't get the right height like in the video . really need help
Eric M
2,242 PointsEric M
2,242 PointsAnother person with the same issue: https://teamtreehouse.com/forum/how-do-i-get-the-body-text-to-adjust-to-the-container makes me think it is iOS version related. Not sure what the solution is.