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 – drawing our fingers

When the multi-touch or magic trackpad is touched, our custom view methods will be invoked and we will be able to draw the placement of our fingers on the trackpad in our custom view.

  1. In Xcode, click on the filename BTSFingerView.h in the project navigator and add the following highlighted property:
    //
    //  BTSFingerView.h
    //  Multi-Finger Paint
    //
    //  Created by rwiebe on 12-05-23.
    //  Copyright (c) 2012 BurningThumb Software. All rights reserved.
    //
    
    #import <Cocoa/Cocoa.h>
    
    @interface BTSFingerView : NSView
    
    // A reference to the object that will
    // store the currently active touches
    @property (strong) NSMutableDictionary *m_activeTouches;
    
    @end
  2. In Xcode, click on the file BTSFingerView.m in the project navigator and ...

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