iOS Friday Followup: Table Views

So, last night we had a great time once again, taking our arrays and displaying them in table views.
When all was said and done, the result looked like this:

Here is the process we followed:

  1. Start a New Project in XCode (View Based Application for iPhone)
  2. Declare our variables and outlets in the view controller header file.
  3. Create properties in the header file for out outlets and variables. (So that we can access them in the implementation file.)
  4. Synthesize our properties in the implementation file. (To let us use them in the implementation file.)
  5. Open Interface Builder and add a TableView to our app.
  6. Link our outlets to the new TableView.
  7. Close IB and return to Xcode.
  8. In the header file, set up our view controller as the delegate and datasource for our TableView.
  9. In the implementation file, initialize our array and put some names in it.
  10. Add the methods to control the TableView.
  11. Configure the TableView with 1 section and as many rows as there are elements in our array.
  12. Tell each cell to show us the corresponding name in our array.

And we’re done!

So, with just those steps, could YOU reproduce the result that we see in the image above?

You can download the  iTable Source Code and take a look yourself. :)

I’ll be posting detailed instructions for each step soon.

Still quiet

Leave a Response