When things go wrong – UITableViewCell Edition

work safe

I’ve been leading a brown bag session at SEP where we gather as a group and write an iPhone application. The main reason isn’t to learn everything about the iPhone. I want to aclimate to the Cocoa development environment. There is enough about iPhone and Mac development that are very different from Java and .NET that I want to make sure we don’t have to learn from the ground up when we start coding with this stuff for real. When talking with Scott Hanselman, John Sonmez called it a parallel universe where everything is slightly different.

That said, We did a session this past Thursdays and I totally borked it. I ruined it from two sides; I didn’t discuss ANY of the concepts regarding either Storyboards (because I don’t know them, maybe?) or UITableView, and I hit a snag with the demo because I dove straight and hard at the code without thinking about my audience. Oops. I promised them a blog post once I figured out what went wrong.

First, the session I will be talking a bit more about the concepts behind the Storyboard. I’ll also be talking about TableView concepts. It might be the whole session, but it should be worth it.

Now, where did the code go wrong? Look at this portion of the Second iOS App tutorial. I missed a few things in it. The default table set up for a Master/Detail view is to use static cells. I needed to change this to a prototype cell, lay it out, and dequeue it using it’s name. The error was coming from a mismatch between telling the table to use a list of items and telling it to show a list of specific cells.

I’m looking forward to our next session, and hopefully it will run smoother now that it seems we’re getting closer to being on the same page.



  1. MaTT  •  Feb 11, 2012 @6:31 pm

    I’m looking forward to the next session, too! The storyboards sound/look very powerful…can’t wait to learn more about them.

  2. Ball  •  Feb 12, 2012 @8:38 am

    Does that mean I should actually read some of the pages I linked?

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>