In this recipe we will learn how to create a subclass of the UITableViewController
class, and use it to populate a UITableView
controller.
The UITableViewController
classes are a perfect way of providing you with the flexibility to manage a table view, and providing the functionality of adding to our base controller the ability of sharing its inheritor classes. For this to happen, we will need to incorporate the methods for a UITableView
class.
To begin, we will need to create a new Xcode project. This can be achieved by performing the following simple steps:
TableViewExample
.TableViewExample
folder, select File | New | New File… or press command + N.TableViewController
as the name of the file to create.What we have done here is add a new TableViewController
class to our TableViewExample application that provides us with the necessary table view methods we can use to interact with the TableView
control.