All subclasses of UIResponder (which UIView is) respond to touchesBegan, that's why you don't have to do anything and you get it for free. However it is far from a gesture recognizer. At a high level gesture recognizers track a lot of things, fore example state. Sure you can use touches began, but imagine extending that to pick up something like a three finger long press, swipe or pinch. Things get ugly quick. Installing a gesture recognizer simplifies things.
For example a long press:
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] init];
longPress.numberOfTouchesRequired = 3;
[longPress addTarget:self action:@selector(longPressDetected:)];
[self.view addGestureRecognizer:longPress];
Edit
To implement the delegate:
In your implementation file (.m) add the line at the end of your @implemation line. It should look something like
@implementation ViewController <UIGestureRecognizerDelegate>
Then after you alloc and init your gesture recognizer set the delegate as follows
longPress.delegate = self;
Then implement as many methods as you need from https://developer.apple.com/library/ios/documentation/uikit/reference/UILongPressGestureRecognizer_Class/Reference/Reference.html. For example you might consider these two
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
return YES;
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
return YES;
}