O'Reilly logo

RubyMotion by Clay Allsopp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required