March 2012
Intermediate to advanced
590 pages
22h 48m
English
The first UIGestureRecognizer subclass you will use is UITapGestureRecognizer. When the user taps a line in TouchTracker, you will present a menu that allows them to delete it. Open TouchTracker.xcodeproj from Chapter 19.
In the first part of this section, we are going to recognize a tap, determine which line is close to where the tap occurred, store a reference to that line, and change that line’s color to green so that the user knows it has been selected.
In TouchDrawView.m, edit the initWithFrame: method to create an instance of UITapGestureRecognizer and attach it to the TouchDrawView being initialized.
- (id)initWithFrame:(CGRect)r { self = [super ...Read now
Unlock full access