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 dataSource and delegate

We are now ready to write the program code to implement the required dataSource and delegate methods.

  1. Open the Global Currency project in Xcode.
  2. Click on the file named BTS_GCTableViewDelegate.h and add the following #defines to create literal values that can be used to identify each column of the table view:
    // Create defines that will be used
    // to identify the column in the
    // table view
    
    #define kBTSGCCurrency @"currency"
    #define kBTSGCValue @"value"
  3. Click on the file named BTS_GCTableViewDelegate.h and add the following code to create a reference to a single member variable that we will use to cache a reference to the AppDelegate object:
    #import "BTSAppDelegate.h" #import <Foundation/Foundation.h> ...

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