Creating the TouchTracker Application
Now let’s get started with your application. In Xcode, create a new Window-based Application iPhone project and name it TouchTracker.
First, you will need a model object that describes a line. Create a new NSObject and name it Line. In Line.h, declare two CGPoint instance variables and two properties:
#import <Foundation/Foundation.h> @interface Line : NSObject { CGPoint begin; CGPoint end; } @property (nonatomic) CGPoint begin; @property (nonatomic) CGPoint end; @end
In Line.m, synthesize the properties:
#import "Line.h" ...
Get iOS Programming: The Big Nerd Ranch Guide, Second Edition now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.