O'Reilly logo

Mac Application Development by Example Beginner's Guide by Robert Wiebe

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

Time for action – implementing the TableView delegate

In order for our table view to display values, we need to implement something called a delegate. As its name implies, a delegate performs a task on behalf of another object. In this case our table view delegate will handle any clicks on our table and will implement the methods that return the information that will be displayed in the table's rows and columns.

  1. Add the member variable to BTSAppDelegate.h as follows:
    // 
    // Define the Member elements
    //
    
    @property (strong)  NSMutableArray *m_numbersArray;
  2. Add the member variable to BTSAppDelegate.m as follows:
    //
    // Define the Member elements
    //
    
    @synthesize m_numbersArray;
  3. From the File menu, select New, then select New File… and create a new class named ...

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