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 trial
Lee Hardy
5,407 PointsDiary app interface inconsistent
Hi all,
I'm following along with the diary app tutorials, I just finished the 5th section (Custom UITableViewCell) however my interface looks pretty terrible.
The issues I have are:
The body label text is not word wrapping, I have a single line with ... at the end. I have the following code which I believe Ash says is to enable word wrapping in the GCRect boundingBox of EntryCell.m (NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin)
Also, both of my UIImageViews are not aligned within the table cell, I have placed them to the top left of the cell however when the app is running they appear central to the cell vertically. I checked the autosizing and they are only configured to 'stick' to the left and top margins.
I also double checked and Auto Layout is disable for the UITableViewController (and cell)
I also rechecked my code with the videos and it appears ok
Thanks for any help
Lee
1 Answer
Lee Hardy
5,407 PointsManage to fix this
It was due to my error, it looks like I was setting the actual imageView of the UITableViewCell, and not setting the image of my mainImageView IBOutlet.
Code was self.imageView.image = [UIImage imageWithData:entry.imageData]; And is now self.mainImageView.image = [UIImage imageWithData:entry.imageData];