Starting with Simple Rows

For now, our task is simple: display a table with all the letters of the alphabet:

images/tables/table_basic.png

Last I checked there are twenty-six of them, so that’s enough to show off the fancy row reuse that happens with table views. The table is going to be part of our app’s lone controller, so there isn’t a lot of setup to worry about this time.

First we create a new project called TableFun, and the controllers folder in ./app. Our controller will be AlphabetController, so let’s store it in ./app/controllers/alphabet_controllerrb. Our initial implementation should look like this:

 class ...

Get RubyMotion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.