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
Szabolcs Varga
Courses Plus Student 662 PointsCustom Table View Cell with Text or Text + Image Question
I would like to create a table view where each row represent a blog post. There will be two type of posts. Post with text only and post with text+image. My question is that how should i implement this? (with storyboard)
I need two custom table view cell, one for the text post and one for the image post? And use an if/else statement for the cellForRowAtIndexPath to figure out which cell should i use?
Or i need one UITableViewCell with a UIImageView and the UITextView and also use an if/else statement to check when a post contains an image?
I really appreciate any other ideas. Thanks in advance.