#import "MyGestureRecognizer.h"

@implementation MyGestureRecognizer

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

    [super touchesBegan:touches withEvent:event];

    //if ([self.delegate respondsToSelector:@selector(gestureRecognizer:beganWithTouches:andEvent:)]) {
    //    [(id)self.delegate gestureRecognizer:self beganWithTouches:touches andEvent:event];
    //}
    [(id)self.delegate gestureRecognizer:self beganWithTouches:touches andEvent:event];

}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

    [super touchesMoved:touches withEvent:event];

    //if ([self.delegate respondsToSelector:@selector(gestureRecognizer:movedWithTouches:andEvent:)]) {
    //    [(id)self.delegate gestureRecognizer:self movedWithTouches:touches andEvent:event];
    //}
    [(id)self.delegate gestureRecognizer:self movedWithTouches:touches andEvent:event];

}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {

    [super touchesEnded:touches withEvent:event];

    //if ([self.delegate respondsToSelector:@selector(gestureRecognizer:endedWithTouches:andEvent:)]) {
    //    [(id)self.delegate gestureRecognizer:self endedWithTouches:touches andEvent:event];
    //}
    [(id)self.delegate gestureRecognizer:self endedWithTouches:touches andEvent:event];

}

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {

    [super touchesCancelled:touches withEvent:event];

    //if ([self.delegate respondsToSelector:@selector(gestureRecognizer:cancelledWithTouches:andEvent:)]) {
    //    [(id)self.delegate gestureRecognizer:self cancelledWithTouches:touches andEvent:event];
    //}
    [(id)self.delegate gestureRecognizer:self cancelledWithTouches:touches andEvent:event];

}

@end