Working with UITableView
In this section, we'll start by taking a look at UITableView
, one of the most – if not the most – common ways of displaying data in a list in iOS.
Setting up the project
Every time you start a new project in Xcode, you have the option to pick a template for your app. Every template contains a small amount of code or some boilerplate code to get you started. In most cases, a basic layout will even be set up for you. Throughout this book, you should default to using the Single View App template. Don't be fooled by its name; you can add as many views to your app as you would like. This template just provides you with one view to start with.
In this chapter, you will create an app that is called My Contacts. This app displays your user's contacts list in a UITableView
component that you will set up. Let's create a project for this app right now.
In the menu bar, do the following:
- Select File | New | Project...