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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.