Skip to content

Commit

Permalink
updated to remove gesture rec; now call super on touch events
Browse files Browse the repository at this point in the history
  • Loading branch information
alist committed Feb 22, 2012
1 parent 124a36c commit f758f3e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/KalGridView.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ - (id)initWithFrame:(CGRect)frame logic:(KalLogic *)theLogic delegate:(id<KalVie
logic = [theLogic retain];
delegate = theDelegate;

UITapGestureRecognizer * singleTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didRecognizeTileTap:)];
[singleTapRecognizer setDelaysTouchesBegan:FALSE];
[self addGestureRecognizer:singleTapRecognizer];
// UITapGestureRecognizer * singleTapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didRecognizeTileTap:)];
// [singleTapRecognizer setDelaysTouchesBegan:FALSE];
// [self addGestureRecognizer:singleTapRecognizer];

CGRect monthRect = CGRectMake(0.f, 0.f, frame.size.width, frame.size.height);
frontMonthView = [[KalMonthView alloc] initWithFrame:monthRect];
Expand Down Expand Up @@ -154,6 +154,8 @@ - (void)receivedTouches:(NSSet *)touches withEvent:event

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];

UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self];
UIView *hitView = [self hitTest:location withEvent:event];
Expand All @@ -169,11 +171,15 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];

[self receivedTouches:touches withEvent:event];
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];

UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self];
UIView *hitView = [self hitTest:location withEvent:event];
Expand Down

0 comments on commit f758f3e

Please sign in to comment.