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

iOS Build a Blog Reader iPhone App Rebuilding from Scratch Adding a Table View Controller Class

Gabriel Savard
Gabriel Savard
625 Points

Runtime Issue

  • (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reuseIdentifier" forIndexPath:indexPath];

    cell.textLabel.text = [self.titles objectAtIndex:indexPath.row];

    return cell;

this is the part that is causing the problem: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reuseIdentifier" forIndexPath:indexPath];

I rewatched the debugging video and try a few options but nothing seems to be working.

Gabe Nadel
seal-mask
.a{fill-rule:evenodd;}techdegree
Gabe Nadel
Treehouse Guest Teacher

What do you mean "causing a problem"? What is the problem, exactly?

If you put a breakpoint before the line "return cell", what are the values of "cell", self.titles and cell.textLabel.text?

Also, you might want paste in the entire contents of those .m and .h files.

Lastly, where did you name your cell "@"reuseIdentifier" ?