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!
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 trial

Jake Wernette
3,387 PointsDiary App height for entry
I can't get the diary entries to show more than one line. I have made the margins ridiculous numbers and still just one line of text. Any suggestions?

Jake Wernette
3,387 PointsCGRect boundingBox = [entry.body boundingRectWithSize:CGSizeMake(200.f, CGFLOAT_MAX)
options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName: font} context:nil];
return MAX(minHeight, CGRectGetHeight(boundingBox) + topMargin + bottomMargin);
code that sets the bounding box
4 Answers

Jake Wernette
3,387 Pointsnumber of lines was set to 1 in storyboard, had to set it to 0 and the app works as it is suppose to.

Jonathan Fernandez
8,325 PointsThanks for this comment. It had helped me get passed the problem as well and I really appreciate this. : )

Brian Stevens
7,906 PointsYup, had this issue too. Thanks!

Charlie O'Shea
18,737 PointsThis worked for me but I'm sure he still had it set to 1 in the video. Unless he did another one of those really quick fixes.

Jake Wernette
3,387 PointsIve retyped the code from the videos probably 3 times.

Gregory Serfaty
37,140 Pointsin memory you need to use this method numberOfLines

Andrew Kelly
4,738 PointsThanks Jake. I was pulling my hair out trying to find the problem too!
Jake Wernette
3,387 PointsJake Wernette
3,387 Points[alt text](file://localhost/Users/jake/Desktop/iOS%20Simulator%20Screen%20shot%20Jun%2020,%202014,%2010.35.53%20AM.png "Title")