Time for action – saving the strokes
Similar to how we created a custom view for our finger touches, we can create a second custom view for completed strokes.
- Create a new file in Xcode, using the Mac OS X Cocoa Objective-C class template, that is a subclass of
NSView, and call it
- In the
.xib file, click on the Finger View object and select Duplicate from the Edit menu to make a copy of the Finger Viewobject.
- Select the new Finger View, and in the Identity inspector, change its Class to
- In the Objects hierarchy, drag the Finger View object into the original Stroke View object to make it a subview of the original object. The new Objects hierarchy will look as shown in the following screenshot:
- In the file named