Creating the TouchTracker Application

Now let’s get started with your application. In Xcode, create a new Empty Application iPhone project and name it TouchTracker. The class prefix should be the same as the other projects, BNR (Figure 12.2).

Figure 12.2  Creating TouchTracker

Creating TouchTracker

First, you will need a model object that describes a line. Create a new subclass of NSObject and name it BNRLine. In BNRLine.h, declare two CGPoint properties:

#​i​m​p​o​r​t​ ​<​F​o​u​n​d​a​t​i​o​n​/​F​o​u​n​d​a​t​i​o​n​.​h​>​

@​i​n​t​e​r​f​a​c​e​ ​B​N​R​L​i​n​e​ ​:​ ​N​S​O​b​j​e​c​t​

@​p​r​o​p​e​r​t​y​ ​(​n​o​n​a​t​o​m​i​c​)​ ​C​G​P​o​i​n​t​ ​b​e​g​i​n​;​ ...

Get iOS Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.