You can use requireGestureRecognizerToFail:
for this problem:
UITapGestureRecognizer *gestureRecognizerTripleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tripleTapDetected:)];
[gestureRecognizerTripleTap setNumberOfTapsRequired:3];
[self.theView addGestureRecognizer:gestureRecognizerTripleTap];
UITapGestureRecognizer *gestureRecognizerDoubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTapDetected:)];
[gestureRecognizerDoubleTap requireGestureRecognizerToFail:gestureRecognizerTripleTap];
[gestureRecognizerDoubleTap setNumberOfTapsRequired:2];
[self.theView addGestureRecognizer:gestureRecognizerDoubleTap];
The double-tap one won't fire unless the triple-tap one fails.
The class reference, as usual, has some additional information, and mentions this scenario as a great time to use this method.